5

How could one serve maps (tiles in wherever format possible) within a Android device to be consumed by an offline webmapping app also accessed within the device's browser?

4
  • Isn't the primary factor in this situation cache size, i.e. how much you can store offline? Is it large enough to even be worthwhile?
    – blah238
    Jan 15, 2012 at 0:06
  • 1
    Have you seen this post? gis.stackexchange.com/questions/18325/… Jan 15, 2012 at 14:14
  • @blah238 It is one of the issues, for sure. But I'm thinking to limit the amount of map data available for offline usage by providing some facilities for tile download. Jan 15, 2012 at 23:48
  • @MathiasWestin I did. It's really a very innovative approach, but that 5MB storage limit per origin it's really a deal breaker in a sense of keeping all the tiles needed in the localStorage. The live sample of "Tiles in Local Storage" shows exactly that problem because after ajust a changing in the zoom level the browser starts throwing exception with the message "QUOTA_EXCEEDED_ERR: DOM Exception 22" Jan 16, 2012 at 0:21

2 Answers 2

2

There are a few options using TileMill/Mapbox/MBTiles... Not html5 though. You may want to explore other options for android than html5!!

MBTilesDroidSplitter : https://github.com/djcoin/MBTilesDroidSpitter

Locus : http://www.locusmap.eu/

Nutiteq : http://www.nutiteq.com/android-mapping-api-sdk

3
  • I guess I was hoping that there was some way of setting up a local tile server in way that that HTML5 app could consume geojson tiles, mbtiles, or even other format in some fashionable way. Jan 15, 2012 at 23:55
  • I am about to embark on a dark (first time mobile) path using one of the above 3 packages. Wish me luck! I don't see html5 for mapping applications growing in the android community(yet). Jan 16, 2012 at 8:05
  • 2
    MBTilesDroidSplitter seems like a good catch. I'm hoping we don't have to follow that path (making a native app), though... It will shorten too much our possibilities. Jan 16, 2012 at 11:20
0

Your webmapping offline code (HTML5 + JS) will be located in the Assets folder.

You can put your tiles (XYZ or TMS) in a folder hierarchy inside Assets, too, and access your tiles via relative paths.

You really don't need a web server, the same way you don't need it to import a JS file into your HTML5 page.

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.