Reputation: 1129
I am looking at the SampleWithTilesOverlayAndCustomTileSource example in the osmdroid pack and I am wondering where the overlay is coming from/what format the overlay openfietskaart-rcn is - is it Openlayers/a WMS service and how can I make my own custom overlay working for this example? Would it work with GeoServer? I was not able to find tutorials on this example and hope someone can give me a hint on how to create my own layer, based on a .kml file for example. Thanks!
this.mCustomTileSource = new XYTileSource("FietsRegionaal", null, 3, 18, 256, ".png",
"http://overlay.openstreetmap.nl/openfietskaart-rcn/");
Upvotes: 1
Views: 3693
Reputation: 493
The custom tile source doesn't specify a custom URL scheme, so you can assume it uses the default implementation - a folder structure of PNG files starting at the base URL above, followed by zoom/X/Y.png. The numbering matches Google Maps system. Each PNG is 256 pixels square. You can create a custom set of tiles using Mobile Atlas Creator (MOBAC), or I used a library called "mapnik" to convert KMLs to tiles. The tiles could also come from your sdcard.
Here's a good site to show how the tiles are numbered: http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/
MOBAC: http://mobac.sourceforge.net/
Mapnik: http://mapnik.org/
Upvotes: 1