Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Leaflet.js Essentials
  • Table Of Contents Toc
Leaflet.js Essentials

Leaflet.js Essentials

By : Paul Crickard III
4 (7)
close
close
Leaflet.js Essentials

Leaflet.js Essentials

4 (7)
By: Paul Crickard III

Overview of this book

If you are a web developer working with geospatial concepts and mapping APIs, and you want to learn Leaflet to create mapping solutions, this book is for you. You need to have a basic knowledge of working with JavaScript and performing web application development.
Table of Contents (8 chapters)
close
close
7
Index

Heatmaps with Leaflet.heat


The first heatmap you will make will be a density heatmap, using the Leaflet.heat plugin. You can download the JavaScript plugin at https://github.com/Leaflet/Leaflet.heat. The following steps will walk you through creating your first heatmap:

  1. Using LeafletEssentials.html, add a reference to Leaflet.heat.js with either a URL to a remote copy or the path to your local copy, as shown in the following code:

    <script src="http://Leaflet.github.io/Leaflet.heat/dist/Leaflet-heat.js"></script> or,
    <script src="Leaflet-heat.js"></script>
  2. Add an array of points. Your points can contain additional information but must have the latitude and longitude as the first two elements. The following code shows you three points from the code. The full code contains many more, which will allow you to create the heatmap:

    var points = [
    [35.1555 , -106.591838 , "<img src='http://farm8.staticflickr.com/7153/6831137393_fa38634fd7_m.jpg'>"],
    [35.0931 , -106.664177...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Leaflet.js Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon