This repository contains boilerplates for creating control and layer plugins for the Leaflet:
- The
controlfolder contains the boilerplate for creating a Leaflet control plugin. The control shows in the boilerplate version a red rectangle in the lower left corner. This area can / should be filled with your own program code. - The
layerfolder contains the boilerplate for creating a Leaflet layer plugin. The control shows in the boilerplate version an x instead of the given coordinates. You can / should replace the X with your own program code.
- Download the zip file of this repository and unzip the files.
- Open either the index.html file in the layer directory or the index.html file in the control directory. Depending on whether you want to create a layer or a control plugin.
- In the case of the Control plugin you will see a red rectangle in the lower right area. Now fill this area so that your function can start here. In the case of the control plugin, you see an x instead of the given coordinates. Here's your starting point for extending your control plugin.
The Leaflet Control Boilerplate contains two files:
LeafletControlBoilerplate.jscontains the JavaScript implementation boilerplate for a Leaflet control.LeafletControlBoilerplate.csscontains the CSS for styling the Leaflet control.
The Leaflet Layer Boilerplate contains two files:
LeafletLayerBoilerplate.jscontains the JavaScript implementation boilerplate for a Leaflet layer.LeafletLayerBoilerplate.csscontains the CSS for styling the Leaflet layer.