-
Book Overview & Buying
-
Table Of Contents
Leaflet.js Essentials
By :
In Chapter 3, Creating Heatmaps and Choropleth Maps, you learned about several plugins that you can use to create heatmaps. The esri-leaflet plugin also has a heatmap layer that will allow you to pass an ESRI service as the data. To create a heatmap using the esri-leaflet plugin, follow these steps:
First, add a reference to the ESRI-leaflet file, and since the heatmap layer is not included in the core build of the esri-leaflet plugin, you will need to reference an additional ESRI file, esri-leaflet-heatmap-feature-layer.js. The ESRI heatmap layer requires leaflet-heat.js, so you need to add a reference to that as well:
<script src="http://cdn-geoweb.s3.amazonaws.com/esri- leaflet/0.0.1-beta.5/esri-Leaflet"></script> <script src="esri-leaflet-heatmap-feature- layer.js"></script> <script src="leaflet-heat.js"></script>
Create your map and basemap as you normally would and then add the heatmap layer. The heatmap layer requires...
Change the font size
Change margin width
Change background colour