2

I want to use my own tile maps in google maps api for android .The tile maps are created using ArcGIS for server 10.2 . The cache size is about 400 megabyte .I can't copy the cache in mobile devices because i want to create small size apk . Is there any solution to use the caches in google map api for android?

I use ArcGIS Desktop and server 10.2 for caching and google maps api .

I don't want use rest service of ArcGIS server service .

Is there amy api's that i can use for my purpose?

2
  • 1
    I find your question confusing. What tile cache do you have? Why can't you copy it to the device? What APIs are you looking to use? Commented Dec 3, 2014 at 8:30
  • @DevdattaTengshe tile caches are created using ArcGIS for server 10.2 . the folder size containing the tile cache are about 400 megabytes. then the final size of apk is above 400 megabyte !!! . I'm looking to use Google Maps Android API v2 . Thanks
    – BBG_GIS
    Commented Dec 3, 2014 at 9:50

1 Answer 1

2

We have developed a simlar Android Application that shows Map data in an offline Mode.

To show the map, we used the Google Maps API for Android; The data came from a couple of MBtiles files. We used the code from https://github.com/cocoahero/android-gmaps-addons to display the tiles from MbTiles on to the map.

In your case, the tiles are created by ArcGIS Desktop, and the format will be different. so you'll have to write the code which displays the tiles from the tilecache onto Google Maps.

We also faced the issue that the Mbtiles files were very large. In our case, one file containing satellite data was over 1.5 Gb while the other was about 200 Mb. So keeping these files in the APK Assets was out of the question. There are two possible solutions for this:

  1. When you APK starts, let it check for the files, and if they are not there, then download them from your server, and place them in the required folder.

  2. While Installing the App, manual copy the MbTiles files onto the device.

In our case, it was an internal Enterprise Application, and we had full control over the Devices and installation. Hence we went with the second option.

There is one more possible bottle neck you should be aware of in this workflow: The Activity/fragment which contains the Google Maps, needs to connect to Google's server at least once before it can show the map to the user. Hence need to open the map once when connected to the internet, before you can use it in an off-line mode.

2
  • Will this work offline ?? Commented Dec 29, 2015 at 23:49
  • It will work offline, as long as you read and follow the last paragraph from my answer Commented Dec 30, 2015 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.