cross platform mapping with universal windows apps

36

Upload: joost-van-schaik

Post on 27-Jun-2015

272 views

Category:

Technology


0 download

DESCRIPTION

TechDays Netherlands talk April 16, 2014. Demo's can be downloaded from http://1drv.ms/1hgENLH

TRANSCRIPT

Page 1: Cross platform mapping with Universal Windows Apps
Page 2: Cross platform mapping with Universal Windows Apps

Cross platform mapping met Universal Windows AppsOfwel: bouw 1100+ apps met open data

Joost van SchaikWindows Phone Development MVP

Page 3: Cross platform mapping with Universal Windows Apps

Hello

• Joost van Schaik aka LocalJoost• [insert fancy title of the day] @ Vicrea Solutions• Geo-ict

•Windows Phone Development MVP•Nokia Developer Champion•4 open sources libraries, 1 nog actief

Page 4: Cross platform mapping with Universal Windows Apps
Page 5: Cross platform mapping with Universal Windows Apps
Page 6: Cross platform mapping with Universal Windows Apps

</commercials</plugs>

Page 7: Cross platform mapping with Universal Windows Apps

Agenda

•What’s new• Convergence: gebruik maken van Universal Windows Apps• Basis kaart manipulatie• Tekenen op de kaart• Geocoding• Routing• Geofencing• Tracking• Gebruik van 1100+ NL open geo data sets

Page 8: Cross platform mapping with Universal Windows Apps

!(Agenda)

•MVVM•Behaviors•Databinding (nou ja, heel klein beetje)

Page 9: Cross platform mapping with Universal Windows Apps

What’s new

• Nieuwe nieuwe map control: Windows.UI.Xaml.Maps.MapControl• Vrijwel gehele API rondom mapping• Geofencing• Eenvoudiger / consistenter geometrie• MapIcon

• MapControl.Children -> XAML objects • Sterk verbeterde tile sets*• Geopoint

* = niet in dit verhaal

Page 10: Cross platform mapping with Universal Windows Apps

Mapping convergence

Korte verhaal: we zijn er nog niet

•Bing Maps vs Here Maps control•Location vs Geopoint• Geoposition (voor location)

•Events op map (phone) vs events op shapes (Win8)•Grote verschillen in advanced mogelijkheden en simulatie

Page 11: Cross platform mapping with Universal Windows Apps

Is er eigenlijk mapping convergence?

•Geolocation 100%•Geofencing 100%•Geopoint

•Processing geodata in shared part of PCL

Page 12: Cross platform mapping with Universal Windows Apps

Eerst en vooral

•Map key•Capabilities: internet client &location•Bing Maps: x64

Page 13: Cross platform mapping with Universal Windows Apps

Demo 1 – de basis

•Basis kaart manipulatie•Tekenen kaart shapes•Data opvragen• ADP to the rescue

•Gedeelde code in universele app en PCL

Page 14: Cross platform mapping with Universal Windows Apps

Lessons learned – demo 1

•Basis kaart manipulatie•Twee coördinaattypes en conversie•MapIcon (niet in Windows 8)• Smart display• Labeling

•ADP koppeling geometrie -> object•Shared code -> Frame rate counter in één klap uit

Page 15: Cross platform mapping with Universal Windows Apps

Demo 2 – routing & fencing

•Geocoding•Routing•Geofencing•Tracking (GPS)

Page 16: Cross platform mapping with Universal Windows Apps

Lessons learned – demo 2

•Geofencing en location code 100% sharable• Via Geoposition - location type #3

•Geocoding & routing niet• Partial classes • Slim gebruik shared project = sharing++• Shared code -> methods in non shared code• Shared aux usercontrols piece of cake•Context switcher stuurt F12• Phone emulator >Windows simulator

Page 17: Cross platform mapping with Universal Windows Apps

Demo 3 – schaatsbanen, visstekken, vaarroutes en natuurgebieden

•Open geodata •Nationaal georegister•Mapping Code sharing strategies

Page 18: Cross platform mapping with Universal Windows Apps

WFS/GMLCaution! Hard core GIS stuff ahead!

Ofwel: open geo data en hoe te gebruiken

Page 19: Cross platform mapping with Universal Windows Apps

•WFS• Http get (ofwel – URL in browser)• ‘rest before rest’• 2 versies

•GML – XML• 3 versies

WFS & GML

Page 20: Cross platform mapping with Universal Windows Apps

GML

•Coördinaatsysteem : 4326•FeatureType•OutputFormat•WGS84BoundingBox

Page 21: Cross platform mapping with Universal Windows Apps
Page 22: Cross platform mapping with Universal Windows Apps
Page 23: Cross platform mapping with Universal Windows Apps

Getcapabilities

{baseurl}?request=getcapabilities&service=WFS&Version=1.1.0

Page 24: Cross platform mapping with Universal Windows Apps

Capabilities analyse

:FeatureType>

NameSRS 4326OutputFormatWGS84BoundingBox

Page 25: Cross platform mapping with Universal Windows Apps

Ordinaat volgorde

•Coordinaat = (ordinaat, ordinaat)•Soms (lat,lon), soms (lon, lat)

•En anders – proberen maar

Page 26: Cross platform mapping with Universal Windows Apps

Gefeliciteerd!Je hebt het hardcore GIS deel overleefd en je bent hier nog steeds!

HULDE!

Page 27: Cross platform mapping with Universal Windows Apps

GML parsing

•WFS url • GetFeature• Bbox• EPSG:4326

• ->UTF8 •Attributes•Geometry parsing•Helemaal in PCL

Page 28: Cross platform mapping with Universal Windows Apps

Lessons learned

•Open geo data -> veel apps (DVLUP! XP!)

•GML bloated formaat • Check vóór downloaden!!!• -> download, parse, local storage

•OGC

•Beetje architectuur -> share++

Page 29: Cross platform mapping with Universal Windows Apps

Lessons learned – shared code

•Shared code:• ‘Global’ reusable -> PCL• Project sharable -> Shared portion

•Sharing• Partial classes• #ifdef toch vaak simpeler• Gebruik context switcher(!)

•Call shared code -> PCL•Call shared code -> Non shared code• Twee implementaties nodig

Page 30: Cross platform mapping with Universal Windows Apps

Samenvatting

•Nieuwe map control voor Windows Phone•Gebruik universal project• Shared code, partial classes, PCL

•Overeenkomsten • Tracking, Geofencing, Map Manipulation

•Verschilllen• Tekenen van shapes, Geocoding, Routing• Point types

•Ongetwijfeld meer, maar niet in dit verhaal.

Page 31: Cross platform mapping with Universal Windows Apps
Page 32: Cross platform mapping with Universal Windows Apps

Mocht je nog steeds niet genoeg van me hebben

http://dotnetbyexample.blogspot.com

@localjoost

[email protected]

localjoostnl

Page 33: Cross platform mapping with Universal Windows Apps

Laat ons weten wat u vindt van deze sessie! Vul de evaluatie in via www.techdaysapp.nl en maak kans op een van de 20 prijzen*. Prijswinnaars worden bekend gemaakt via Twitter (#TechDaysNL). Gebruik hiervoor de code op uw badge.

Let us know how you feel about this session! Give your feedback via www.techdaysapp.nl and possibly win one of the 20 prices*. Winners will be announced via Twitter (#TechDaysNL). Use your personal code on your badge.

* Over de uitslag kan niet worden gecorrespondeerd, prijzen zijn voorbeelden – All results are final, prices are examples

Page 34: Cross platform mapping with Universal Windows Apps

Related sessions 16-4Slot Title Speaker17:45

App Analytics voor Windows Phone en Windows Store

Mark Monster

17:45

Je hebt een app. Nu alleen nog verkopen! Dennis Vroegop

Page 35: Cross platform mapping with Universal Windows Apps

Related sessions 17-4 (1)Slot Title Speaker09:15

Diagnosing performance issues in Xaml based Windows Phone and Windows Store Apps with Visual Studio 2013

Harikrishna Ajithkumar Menon

09:15

Designing XAML Apps using blend for Visual Studio 2013

Fons Sonnemans

09:15

Building Windows Store apps for Windows Phone 8.1

Andy Wigley

10:50

Making the most from Windows Phone App Studio

Tom Verhoeff

Page 36: Cross platform mapping with Universal Windows Apps

Related sessions 17-4 (2)Slot Title Speaker09:15

Jouw apps op alle schermen en resoluties Martin Tirion

14:50

Bouwen en distribueren van je Enterprise apps voor Phone

Matthijs Hoekstra

16:20

Networking, Mobile Services and Authentication on Windows Phone 8.1

Andy Wigley