Binnenkort is ArcGIS ook beschikbaar voor telefoons met Android. ArcGIS for Android breidt de mogelijkheden van het ArcGIS-platform uit naar de Android. Het bestaat uit een ArcGIS-applicatie, die gratis te downloaden is via de Android Market. Met deze applicatie kan de gebruiker kaarten van de ArcGIS Server of ArcGIS.com bekijken en bewerken. Door gebruik te maken van de API, kunnen ontwikkelaars zelf geogebaseerde applicaties ontwikkelen. The API bevat een plugin op het Eclipse Integrated Development Enviroment, zodat ontwikkelaars snel aan de slag kunnen met ArcGIS voor Android. De presentatie geeft een overzicht van de mogelijkheden van de standaard ArcGIS for Android applicatie en de API. Tijdens de presentatie wordt stap voor stap een case uitgewerkt.
Hiermee wordt duidelijk hoe met de ontwikkel
tools en API gewerkt kan worden. Daarnaast wordt
uitgelegd hoe de ontwikkelaar gebruik kan maken
van de mapping, geocoding en geoprocessing mogelijkheden van ArcGIS Server of ArcGIS Online.
8. ontdekkenenterprise Mobile lokaal Desktop Positionering Vollediggeïntegreerd Desktop, web, mobiel ArcGIS Mobile Microsoft Windows Applicatie / SDK ArcGIS for SmartPhone ArcGIS for iOS ArcGIS for Windows phone ArcGIS for Android Applicatie API
10. Functioneeloverzicht Mapping Layers: Map, Tile, Graphic, Feature Callout Functionaliteit (Tasks) Identify, Query, Locator, Geoprocessor Editing Template-based, vergelijkbaar met andere web APIs Connected via feature layer
11. Ontwikkelenvoor Android Android device Eclipse Dalvik VM Write Java Android SDK Run app Compile to Dalvik classes Launch as Android app Android app framework Deploy to device/emulator Debug/log app
12. Layout Android Componenten Activity Activity App View View View View Service Service Event Listeners / Handlers Data / Content Providers Event Listeners / Handlers Event Listeners / Handlers
13. Watheeft u nodig? Eclipse – 3.5 or 3.6 Android SDK – 2.1, 2.2, 2.3 ArcGIS for Android SDK API Eclipse plugin Samples Doc
14. Een Android project /src Your code /gen Built classes /res Your resources Images Styles xml Layout xml AndroidManifest.xml Application configuration
15. Kaartopenen Layout Grootte en positie Tonen attributes (afhankelijk van container) Standaardfunctionaliteit Touch events – in/uitzoomen, schuiven Maatwerkfunctionaliteit Toevoegen van event listeners en handlers Initialisatie Controle of de kaart is geladen Meer later…
16. Hoe voegt u kaartlagen toe in xml <com.esri.android.map.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map”android:layout_width="fill_parent" android:layout_height="fill_parent” initExtent="-13631799.97888788 4545982.2729670685 13630011.658698952 4547213.547551089"> <com.esri.android.map.ags.ArcGISTiledMapServiceLayer url="http://services.arcgisonline.com/ArcGIS/rest/services/ World_Topo_Map/MapServer" /> <com.esri.android.map.ags.ArcGISDynamicMapServiceLayer url="http://mobilesampleserver.arcgisonline.com/ArcGIS/rest/ services/SanFranFireInfo/MapServer" /> <com.esri.android.map.GraphicsLayer android:id="@+id/graphics" /> <com.esri.android.map.ags.ArcGISFeatureLayer url="http://mobilesampleserver.arcgisonline.com/ArcGIS/rest/ services/HaightAshburyHydrantsFs/FeatureServer" mode="snapshot" />
17. Hoe voegt u kaartlagen toe in de code Dynamic map layer ArcGISDynamicMapServiceLayer sanFranFireInfo = new ArcGISDynamicMapServiceLayer(this, "http://mobilesampleserver.arcgisonline.com/ArcGIS/rest/services/ SanFranFireInfo/MapServer"); map.addLayer(sanFranFireInfo); FeatureLayer ArcGISFeatureLayer.OptionssanFranHydrantsOptions = new ArcGISFeatureLayer.Options(); sanFranHydrantsOptions.mode = ArcGISFeatureLayer.MODE.SNAPSHOT; ArcGISFeatureLayersanFranHydrants = newArcGISFeatureLayer(this, "http://mobilesampleserver.arcgisonline.com/ArcGIS/rest/services/ HaightAshburyHydrantsFs/FeatureServer", sanFranHydrantsOptions); map.addLayer(sanFranHydrants);
19. Informatiegeen Data Data omzettennaarInformatie Gebruikerservaringen Verzamelgegevens Uitvoeren van de functionaliteit Toont de uiteindelijkeinformatie en NIET alleen data Taken Query, Identify, Locators, Geoprocessor
21. Verkrijgen van data uit de lagen in de kaart All asynchronous methods Denkna over de processen… Feature layer queries selectFeatures() queryFeatures() GebruikCallbackListener<FeatureSet>() Query query = new Query(); query.setWhere(whereClause); sanFranHydrants.selectFeatures(query, SELECTION_METHOD.NEW, newCallbackListener<FeatureSet>() { publicvoidonCallback(FeatureSetqueryResults) { ...
22. Queries op grafischelagen Nietasync Feature layer is a graphics layer! Graphic[] graphics = sanFranHydrants.getGraphics(x, y, 30);
23. OverigeFuncties Type Functies QueryTask Werkt op een layer IdentifyTask Werkt in eenkaart Locators ArcGIS Server Bing Geoprocessor (GP) ArcGIS Server services
29. Road ahead ArcGIS for Smartphone dezelfdefunctionaliteit Volgende release Q2 2011 Includes Meer layer types (bing/image server) Secure services En daarna VolgtWebmap support…. Disconnected workflows
30. Vragen & Aanvullendeinformatie http://betacommunity.esri.com http://resources.arcgis.com/content/arcgis-android/api Marco Wagemakers – mwagemakers@esri.nl
Notes de l'éditeur
Sits with other mobile apisDemand for a platform solution from customersSimilar in scope to web apisOff cycle – own release cycle benefits?Beta in febFinal – soon!
Software stack for mobiles includes os, middleware and key appsHas an SDK – program in Java…Current release in gingerbreadBeta release is Honeycomb lots of work for tablet market
To help understand components of android and how it worksDiagram of the development workflow
App consists of one or more services AND/OR one or more activitiesService is long running application without GUIActivity provides a screen for users to interact with, multiple activities live in a stack… Has lifecycle to hook into for adding contentAn activity consists of one or more Views. Basic UI units – extended by widgets Button, text, image, date picker Receives eventsVia handlers or listeners- in view and activityData provided to view via data or content providers
SDK demo API docs - MapView class, FEatureLayer class Samples doc Other docEclipse demo New application Sample application Add a map layer
Samples use a fill parent
Map viewInit extentTiled layerDynamic layerGraphics layerFeature layer – includes mode
SDK demo API docs - MapView class, FEatureLayer class Samples doc Other docEclipse demo New application – called test New Sample application Add a map layer using right click
UX is the majority of the code ( input and output)Esri task code not muchTasksEquate to tasks in the other apis
MapView events – interactive People expect to be able to touch the map and it do something
First way is to get data from layers in the mapOncalljback – convert data into information!
No server callsNo attribute queriesOnce you have the graphic get attributes and show to the user
Second way to get data ….Asynchronous – can run in many waysThreading…Query – single layer – attribute and spatialIdentify multiple layersLocatorsgeocode and reverse geocodeGP anything! Models soes etc…
Async task shown todayUI thread anything which modifies the view must be run in UI thread, exceptionOthers options for refMore in advanced session
Implement AsyncTaskParameterised using generics - Inputs, progress, resultDo in background runs in background
Convert the data into informationGet out paramsCheck nullGet GP param name
Get callout from the mapjSet style using xml, attributeset valur pairSet anchor floating or explicitly (left right top etc…)Show at pointCan move and set point
Attributes – optional don’t need for adding a symbol to the mapGeometry – need this!Symbol – needIn this example geometry comes from a gprecordset layer