Git Product home page Git Product logo

quickstart-map-phonegap's Introduction

quickstart-map-phonegap

A set of simple samples that show how to get started with the ArcGIS API for JavaScript and PhoneGap/Cordova. These samples provide best practices for using PhoneGap and Cordova across different device operating systems and within the PhoneGap/Cordova application lifecycle.

Features

This repo contains four sample applications.

  • index_basicmap.html - a basic mapping application configuration.
  • index_basicwebmap.html - uses a simple web map.
  • index_basicgps.html - uses the GPS to acquire current location and center the map.
  • index_jquerymobilegps.html - demonstrates how to use jQuery mobile with PhoneGap and the ArcGIS API for JavaScript.
  • index_jquerymobilegps_localarcgis.html - demonstrates a local version of the ArcGIS API for JavaScript that was created using http://jso.arcgis.com/.

The jQuery sample also makes use of the jquery-mobile-map-js repository's jQueryHelper library.

Instructions

Install the Cordova command line interface (CLI), then:

  1. Fork and then clone this repo or download the .zip file.

  2. Download Cordova.

  3. Follow the Cordova platform installation instructions for installation and configuration instructions.

  4. Follow the Cordova guidelines for creating an app. Example

     $ cordova create hello com.example.hello HelloWorld
    
  5. Add additional platforms. Example

     $ cordova platform add android
    
  6. Copy the contents from this repo into any newly created /www directories

  7. Set which sample you want the application to launch in the config.xml <content> tag.

     <content src="index_jquerymobilegps.html" />
    
  8. To take advantage of GPS and Geolocation capabilities you may need to install the Geolocation plugin.

  9. Build the app and launch!

Testing

These applications will not work as stand-alone web applications because there are coded specifically for PhoneGap/Cordova.

For the most definitive approach, build and run application directly on a device. Use console.log statements for troubleshooting. With the latest versions of Chrome and Safari you can remotely debug the device as long as it's attached to your laptop via a USB cabable. This is super-convienent and very easy to set up.

For rapid tweaking/testing cycles you should also check out the PhoneGap Desktop App.

Minimum Requirements

  • One actual working device for each mobile platform you want to deploy to. Simply testing on an emulator isn't good enough for production use. Test on as many devices as possible.
  • AndroidStudio and XCode (iOS)
  • Android SDK - if you are deploying to Android
  • Node.js - if you want to use the very easy PhoneGap/Cordova CLI command-line interface. Highly recommended!

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Anyone and everyone is welcome to contribute.

Licensing

Copyright 2015 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

[](Esri Tags: ArcGIS PhoneGap Cordova QuickStart) [](Esri Language: JavaScript)

quickstart-map-phonegap's People

Contributors

andygup avatar

Watchers

pmr avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.