Offline vector map development how to solve

3146
3
04-10-2014 09:03 PM
qianglinao
New Contributor
The latest version have offline vector map plan?  I want to do in the case of offline through offline maps the online equivalent of the operation, for example, attribute query, coordinates the query in arcgis for android
0 Kudos
3 Replies
RobertBurke
Esri Contributor
Hi


Please have a look at this Guide topic Create an Offline map:
https://developers.arcgis.com/android/guide/create-an-offline-map.htm

Also look that this topic - Create a Local Runtime Geodatbase
https://developers.arcgis.com/android/sample-code/create-runtime-geodatabase/


Please let me know if this helps you learn how to work with offline vector data.
0 Kudos
qianglinao
New Contributor
thank you for your answer,but the question still  unsolved,because the url you tell me is about feature se

rvice ,it can offline feature data but the main map still need online is mean still need network. that my pla

n is you don't need any network except first init download map data. I know ArcGISLocalTiledLayer can r

ead local tiled but i need vector map because need attribute query like ArcGISDynamicMapServiceLayer y

ou can use QueryTask. looking forward to your answer.
0 Kudos
RobertBurke
Esri Contributor
Hi

If I understand correctly, you want to work totally disconnected, no network connection, no wi fi, you want all the data on the device, and need to Query some layers and see the query results.

You can load a tile package on the device or its SD card to provide a basemap.

You can also load a runtime .geodatabase on the device or its SD card to provide a operational layers.  Your code can add or remove layers at any time.  Here is a block of code from the CreateRuntimeGeodatabase sample. It shows how you can create FeatureLayers from GdbFeatureTables in the .geodatabase local on the device.

    // Geodatabase contains GdbFeatureTables representing attribute data
    // and/or spatial data. If GdbFeatureTable has geometry add it to
    // the MapView as a Feature Layer
    if (localGdb != null) {
      for (GeodatabaseFeatureTable gdbFeatureTable : localGdb.getGeodatabaseTables()) {
        if (gdbFeatureTable.hasGeometry())
          mMapView.addLayer(new FeatureLayer(gdbFeatureTable));
      }
    }

You also want to Query. Please take a look at FeatureLayer in the API:
https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/FeatureLayer.html

FeatureLayer has a selectFeatures method that takes in, QueryParameters.  It is not exactly QueryTask, but it performs in a similar way. 

The QueryParams have a where clause, geometry, spatial relationship and other similarities to QueryTask Query, but it all happens locally on the device without being connected.
https://developers.arcgis.com/android/api-reference/reference/com/esri/core/tasks/query/QueryParamet...

Please let me know if this might work for your app.
0 Kudos