MapTiles

פרמיום
Verified
על ידי Support@MapTilesApi | מְעוּדכָּן vor 17 Tagen | Mapping
פּוֹפּוּלָרִיוּת

9.9 / 10

חֶבִיוֹן

152ms

רמת שירות

100%

Health Check

100%

חזרה לכל הדיונים

Lat/Lon Input

Rapid account: Info 5 Tsb C Nc 38
info-5TsbCNc38
vor 5 Monaten
Can I put in my lat/lon into the URL if I have those?  I can't find documentation on how the X/Y arguments work.  I assumed those were lat/lon inputs, but doesn't seem to work.  Thanks!
Rapid account: Map Tiles Api
MapTilesApi Commented vor 5 Monaten

Hello, no, you cannot use lat/lon to request tiles.

The z/x/y arguments follow the slippy map tiling scheme to display a map.

Normally you would use a framwork like e.g. LeafletJS, OpenLayers, MapLibre or a derivative of those like flutter_map to request tiles and display a map by requesting the right tiles.

If you do need to access single tiles and only have lat and lon, you would first have to define the zoom level you want (from 0 = world to 19 = few houses) and then calculate the x and y values, here you will find some examples for those calculations:

https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

And to explain this further: frameworks like LeafletJS or MapLibre etc. would need an input by lat/lon to display a map. Those frameworks do the calculations to display a map on a website based on lat/lon by requesting the right tiles for an area defined by your lat/lon input. So based on what you want to achieve (e.g. show a map at location lat/lon in a website?) you should use a framework like e.g. Leaflet to get the result you want.

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות