Title: Building Native Apps with ArcGIS API for JavaScript Using PhoneGap and jQuery
1Building Native Apps with ArcGIS API for
JavaScript Using PhoneGap and jQuery
2Agenda
- Intro to PhoneGap
- Esri PhoneGap Quickstart
- Putting it all together
- Native build environment
- Additional information
3Why PhoneGap?
- Mobile cross-browser access to these and more
- SDCard
- Camera
- Accelerometer
- Contacts
- Battery status
- Ability to put JavaScript app in Google Play, App
Store and Windows Phone Store
4Basic PhoneGap app
5What is PhoneGap?
- Application container technology
- Core engine is 100 open source
- Web view container, plus JS API
- HTML5, CSS3, JS Native App
PhoneGap
6PhoneGap architecture
PhoneGap Plugins
PhoneGap
Application Code
Native App
7Setup a developer machine
8PhoneGap Quickstart
9Debugging
10Putting it all togetherPhoneGap, jQuery and
ArcGIS API for JavaScript
11Single Page view
- Set up page structure
- Apply CSS, roles and themes
- https//github.com/Esri/quickstart-map-phonegap
- https//github.com/Esri/jquery-mobile-map-js
12Single Page Map - HTML
13Single Page Map - HTML
14Single Page Map - HTML
15Single Page Map - CSS
16Single page app
17Auto-recenter after orientation change
18jQuery Helper library
- Recentering on device rotation
- Multiple view mapping apps
- var helper new jQueryHelper(map)
- https//github.com/Esri/jquery-mobile-map-js
19Auto-recenter after orientation change
20A quick lookAndroid native build environment
21assets/www/
22Host JS libs locally(if possible)
23Set PhoneGap config.xml
24Native wrapper
25Putting it all together
26GPS Best Practices - Android
27GPS Best Practices - Android
28GPS Best Practices - iOS
29GPS Best Practices Windows Phone
30Geolocation API same as always!
31Requirements for offline?
- App usage in areas of intermittent or no
internet - Ability to reload or restart app in areas of
intermittent - or no connectivity
- Lightweight cross-browser functionality
- Github.com/esri/Offline-editor-js
32Offline JS Use Cases
- Viewing simple maps
- Lighweight data collection
- VGI
- Simple editing
- Devices
- laptop
- smartphone / tablet
33Need a full featured, robust offline solution?
- ArcGIS Runtimes for iOS, Android, Qt and .NET!
- Includes integrated support for offline editing
and synchronization. - Also fully supports related tables, sub-types,
domains and much more.
34Offline Demo trailyelper
35Questions?
- Andy Gup
- Developer Evangelist Team
- agup_at_esri.com
- _at_agup
- Lloyd Heberlie
- JavaScript API Team
- lheberlie_at_esri.com
- _at_lheberlie
36(No Transcript)