Leaflet.JS – JavaScript library for interactive HTML5 maps
Leaflet.JS is an open-source JavaScript library developed by Vladimir Agafonkin.
it’s an Open-source JavaScript Library to create Mobile friendly interactively Map for Smartphones.
The script is only about 31 KB in weight and offered all major features required for Online maps.
The script is working seamlessly on all major desktop and mobile platforms out of the box, taking advantage of HTML5 and CSS3 on modern browsers while still being accessible on older ones.
How to Install :
// create a map in the "map" div, set the view to a given place and zoom var map = L.map('map').setView([51.505, -0.09], 13); // add an OpenStreetMap tile layer L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' }).addTo(map); // add a marker in the given location, attach some popup content to it and open the popup L.marker([51.5, -0.09]).addTo(map) .bindPopup('A pretty CSS3 popup. Easily customizable.') .openPopup();
Features :
- Map Layers – Tile layers, Markers, Popups, Vector Layers, Image Layers, WMS Layers, Layer groups, GeoJSON layers
- Drag panning with inertia
- Zoom Animation
- Panning animation
- Smooth continuous zoom on modern mobile devices
- Tile and popup fade animation
- Retina resolution support for tile layers and markers
- Pure CSS3 popups and controls for easy restyling the Maps
- Image- and HTML-based markers
- Custom map projections (with
EPSG:4326
,EPSG:3857
andEPSG:3395
out of the box)
Download – Leaflet JS