Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add heatmap visualization mode for markers #145

Open
dmitry-zasypkin opened this issue Apr 20, 2020 · 0 comments
Open

Add heatmap visualization mode for markers #145

dmitry-zasypkin opened this issue Apr 20, 2020 · 0 comments

Comments

@dmitry-zasypkin
Copy link

Heatmap sample code when using Leaflet library (https://leafletjs.com/):

	this._mapObject = L.map(mapDiv).setView([38.845210, 24.333653], 7);

	L.tileLayer('https://b.tile.openstreetmap.org/{z}/{x}/{y}.png', 
		{
			attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
			maxZoom: 18
		}
	).addTo(this._mapObject);

	this._markerData[this._markerData.length] = [lat1, long1, 1];
	...
	this._markerData[this._markerData.length] = [latN, longN, 1];
 
	var heat = L.heatLayer(this._markerData, {radius: 15}).addTo(this._mapObject);

Files needed to make that code work:
https://unpkg.com/[email protected]/dist/leaflet.css
https://unpkg.com/[email protected]/dist/leaflet.js
leaflet-heat.js (from https://github.com/Leaflet/Leaflet.heat)

image_2020_04_19T22_29_03_435Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant