birgit
birgit

Reputation: 1129

Openstreetmap Overlay Osmdroid example

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/");

example here: http://code.google.com/p/osmdroid/source/browse/trunk/OpenStreetMapViewer/src/org/osmdroid/samples/SampleWithTilesOverlayAndCustomTileSource.java?r=829

Upvotes: 1

Views: 3693

Answers (1)

Chris Miller
Chris Miller

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

Related Questions