Tutorial Leaflet Intermediate – Leaflet Legend

leaflet legends

Leaflet.Legend Leaflet.Legend is a plugin for Leaflet that display legend symbols and toggle overlays. Options Option Type Default Description position String ‘topleft’ The position of the control. title String ‘Legend’ The title of the control. opacity Number 1.0 Opacity of the container. legends LegendSymbol[] [] Array of legend symbols that will be added to the container. symbolWidth … Read more

Tutorial Leaflet Expert – Leaflet GeoJson

leaflet geojson

Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse GeoJSON data and display it on the map. Extends FeatureGroup. first, create file data.js add file js into html last, add this script into your js Creation Factory Description L.geoJSON(<Object> geojson?, <GeoJSON options> options?) Creates a GeoJSON layer. Optionally accepts an object in GeoJSON format to display … Read more

Tutorial Leaflet Intermediate – Leaflet Circle

leaflet circle

A class for drawing circle overlays on a map. Extends CircleMarker. It’s an approximation and starts to diverge from a real circle closer to poles (due to projection distortion). Usage example Creation Factory Description L.circle(<LatLng> latlng, <Circle options> options?) Instantiates a circle object given a geographical point, and an options object which contains the circle radius. L.circle(<LatLng> latlng, <Number> radius, <Circle options> options?) Obsolete … Read more

Tutorial Leaflet Intermediate – Leaflet Polygon

leaflet polygon

A class for drawing polygon overlays on a map. Extends Polyline. Note that points you pass when creating a polygon shouldn’t have an additional last point equal to the first one — it’s better to filter out such points. Usage example You can also pass an array of arrays of latlngs, with the first array representing … Read more

Tutorial Leaflet Beginner – Leaflet Quick Start

leaflet quick start

This step-by-step guide will quickly get you started on Leaflet basics, including setting up a Leaflet map, working with markers, polylines and popups, and dealing with events. Preparing your page Before writing any code for the map, you need to do the following preparation steps on your page: Include Leaflet CSS file in the head … Read more