Offline Locator

3474
3
02-05-2014 07:56 AM
deleted-user-YYhuCJuuEn9L
New Contributor III
I'm attempting to use an offline locator however I'm not getting any results when I test it in a 10.2 Android application. I've followed the instructions to create a runtime geodatabase (incl. locator) and essentially copied the code for creating and running the locator int he application. All of the necessary files are present and the locator works in ArcGIS before it's packaged as runtime content. In configuring the locator I set the option to store relative paths. Is the reference table unnecessary in this scenario because the information is stored int he .locb file? Should I try copying the reference file geodatabase feature class to the device/emulator and edit the .loc.xml file to point to it?

Thanks

EDIT: Nevermind. I was able to resolve the issue by copying the file geodatabase to the device. The runtime geodatabase has the following file structure on the device:

/runtime_gdb
......./data
......./locator
............./locator_dir
.................../file_gdb
........................roads feature class
...................locator files

I rebuilt the locator in the runtime geodatabase using the 'roads feature class' as a reference file using relative paths (before copying to the device).
0 Kudos
3 Replies
CepheusChan
New Contributor
Hi Ryan (and whoever that can help),

Do you mind sharing in detail how you create the runtime geodatabase with the locator? I also don't get the part about "using the 'roads feature class' as a reference file". I'm trying to achieve something similar as well. I have a geodatabase with me and I have been able to export and load a tile package file (.tpk) on my device offline. If the geodatabase is required for editing features and querying, does that mind I need both the .tpk file (as basemap) and geodatabase (to edit attributes offline)?

I'm new to ArcGIS and GIS in general so any help would be greatly appreciated.

Thanks in advance!
Cepheus
0 Kudos
RobertBurke
Esri Contributor
Hi Cepheus,

Two suggestions:

Have you reviewed the online help for Offline Editing (in beta)?

https://developers.arcgis.com/android/guide/edit-offline.htm
https://developers.arcgis.com/android/guide/sync-offline-edits.htm

Have you looked at the disconnected editing process using Collector?

http://blogs.esri.com/esri/arcgis/2014/02/17/collector-disconnected-editing-and-sync/
0 Kudos
CepheusChan
New Contributor
Hi Cepheus,

Two suggestions:

Have you reviewed the online help for Offline Editing (in beta)?

https://developers.arcgis.com/android/guide/edit-offline.htm
https://developers.arcgis.com/android/guide/sync-offline-edits.htm

Have you looked at the disconnected editing process using Collector?

http://blogs.esri.com/esri/arcgis/2014/02/17/collector-disconnected-editing-and-sync/


Hi Rob,

Thanks for the reply. I have managed to export my basemap and locator as a Runtime Service. However I am unable to use the search function in my app. It keeps giving me "Regular expression range is not closed" error. I've tested the locator in ArcMap and it works.

Are there any key settings to take note when creating the locator or managing the settings in the locator's Properties? Do I have to add the GDB layer that I created the locator from into the exported map? Or is this more of how my search query is being processed? I followed the codes to initialise and run the location search from the sample project (Place Search). The way I did it was to pop up a dialog with an EditText field and a button to start the search.

Thanks for the link to the Collector, I'll need that functionality as well.

Cheers,
Cepheus
0 Kudos