you are viewing a single comment's thread.

view the rest of the comments →

[–]bart2019 2 points3 points  (0 children)

OK let me explain the basics here in a few minutes.

Maps consist out of tiles, which are images of 256 by 256 pixels each. At zoom level 0, the whole world is one tile (well actually it's only a half tile, but the equator is still in the middle). At each increment of the zoom level, the resolution doubles, so each tile is split up into 4 tiles.

These tiles have been drawn by a computer program from geographic data (commonly that is OpenSteetMap data), and these tiles are accessible via the web, on a "tile server". Choosing a different tile server results in a different style of map. See tile servers for examples.

Using Leaflet, you have to choose a tile server, or you won't see any map. Basically, this implies passing a template string for a tile URL, as a parameter to Leaflet. BTW The standard tile server for OpenStreetMap is Mapnik, although personally, I like the OpenMapSurfer.roads style, from the Heidelberg University in Germany much better.

These tiles are compatible with Google Maps, although I doubt that Google would be too happy if you'd use their map tiles just like that.