After a frustrating few days I came to the conclusion that the Slippy Map Wiki only works for raster tiles, not for OSM2VectorTiles data. I can work with the data once I find the correct tile_data BLOB, but actually locating the correct tile via a user lat/long is problematic. The equations given in the wiki above identify raster tiles correctly, but I'm trying to get this working for an offline version of OpenStreetMap rendering/navigation (meaning I can't just use mapbox's JS API to convert it, also I can't find where the conversion happens in the github repo). Can anyone offer any advice as to how I can convert a lat/long to the correct tile in an OSM2VT SQLite database? The query, that works for raster tiles, may be of some use:
asked 07 Jul '16, 11:01 JamesGould |
You may find the following code from tilemaker relevant: https://github.com/systemed/tilemaker/blob/master/src/coordinates.cpp I don't have any experience with osm2vectortiles because I find Docker and npm about as appealing as sandpapering my eyeballs, but I presume it uses the same tile layout. answered 07 Jul '16, 14:00 Richard ♦ |
cross-posted: https://gis.stackexchange.com/questions/201257/osm2-vectortiles-lat-long-to-tile