Now we have everything in place except our maps. To create interactive maps, we can use external web mapping libraries written in JavaScript. One such library is Leaflet, which is perfectly capable of creating simple interactive maps. Leaflet has a simple and intuitive API, which is very easy to use. All we need is the library's code base and stylesheet loaded in our HTML document. Let's include Leaflet in our web page:
- Download the stable version of Leaflet from http://leafletjs.com/download.html.
- Extract the files in the downloaded archive in the web server's root folder. Optionally, create a new folder for the files to have a well-organized structure.
- Edit the map.html file with a code or text editor.
- Include Leaflet's code base (leaflet.js) with a <script> element using its relative path from the root folder in the...