posm / OpenMapKitAndroid

http://openmapkit.org
BSD 3-Clause "New" or "Revised" License
128 stars 38 forks source link

overzoom when using mbtiles files? #93

Closed danbjoseph closed 8 years ago

danbjoseph commented 8 years ago

is it possible to add overzoom when using an mbtiles file as a basemap?

reason: for offline surveys when low bandwith makes it hard to download large files. we generated remotely an mbtiles file and need to get it to the field. for one of our AOIs the z20 mbtiles is 217mb and the z18 file is 60mb. at z18 it is difficult to select individual buildings.

felixholl commented 8 years ago

that would be a very useful feature for our intended use case in malaria surveillance too.

hallahan commented 8 years ago

The Mapbox Android SDK doesn't do this, but you can trick it. Open up your MBTiles db in sqlite and change the maxzoom property in the metadata table.

My SQLite app of choice is SQLite Studio.

screenshot 2015-11-11 13 12 52

I can look into finding a better solution...

danbjoseph commented 8 years ago

interesting workaround. in the little bit i played around, it doesn't seem to like panning when overzoomed. when panned around at overzoom the basemap would drop out and then you had to zoom out to a level at which tiles exist and then zoom back in.

danbjoseph commented 8 years ago

on a side note (but still concerning file size) is there a way to generate an mbtiles file for an irregular polygon (or multipolygon) area. not just a max-min/lat-lng bounding box. for instance if you were surveying a couple of small villages and wanted one base map file and knew you didn't need all the area in between.

hallahan commented 8 years ago

Not that I know of. You could try using some SQL and remove what you want yourself...

dalekunce commented 8 years ago

The overzoom option would be cool, and save a ton of space.

hallahan commented 8 years ago

Should we defer to new map renderer? This would require enhancing the depracated lib? Close?

dalekunce commented 8 years ago

Let's leave this open until its verified that the new renderer will work as we need it to.

dalekunce commented 8 years ago

switch to new renderer should solve this.

hallahan commented 8 years ago

Not possible with legacy mapping library. GL libs do this.