Introductie in leaflet - NieneB/pzh_web_map GitHub Wiki
Leaflet.js
Leaflet is een open-source JavaScript library om interactieve kaarten mee te maken. Het is lichtgewicht, simpel en flexibel, en waarschijnlijk een van de meest populaire open-source mapping libraries van het moment. Leaflet is ontwikkeld door Vladimir Agafonkin (momenteel bij MapBox)en andere contributers.
Leaflet maakt "Slippy" maps met raster tegel basis lagen, gebruikers interactie zoals pannen en zoomen, en feature lagen die je zelf aanlevert. Het zorgt voor de meest basis taken als muis klik interacties en data omzetten naar kaart lagen, het is makkelijk uittebereiden met versichillende plug-ins.
JavaScript Library
Including a JavaScript library in your code is like copying and pasting someone else's code into yours. You have access to everything in that library. In our case, it's a bunch of cool tools to make web maps and give them familiar functionality.
Web maps
Web maps are made up of many small, square images called tiles. These tiles are typically 256x256 pixels and are placed side-by-side in order to create the illusion of a very large seamless image. A big advantage: all these little tiles load way faster than one big map! This kind of map is called a "Slippy" map.
Each zoom level has its own set of tiles. Zoom level 0 has 1 tile for the world. With each additional zoom level, the number of tiles increases exponentially. So zoom level 1 has 4 tiles for the world. Zoom level 2 has 16 tiles for the world ect.
As you can see, map tiles are static raster images on the web. These tiles need to live somewhere on the web page. They need to know when to load and they need to react when you click or drag. Leaflet is a JavaScript library that allows us to do just that.
Let's start!
:arrow_right: Als je nog nooit met HTML en CSS gewerkt heb begin dan met Making a web page
:arrow_right: Ken je wel al HTML en CSS begin meteen met de workshop Leaflet deel 1