Coder Social home page Coder Social logo

belkey / heatmap.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pa7/heatmap.js

0.0 0.0 0.0 1.71 MB

๐Ÿ”ฅ JavaScript Library for HTML5 canvas based heatmaps

Home Page: https://www.patrick-wied.at/static/heatmapjs/

License: MIT License

JavaScript 92.94% HTML 7.06%

heatmap.js's Introduction

heatmap-Longdo-Map

This is a plugin of heatmap.js for adding heatmap layer on Longdo Map. For more information on heatmap.js, see:heatmap.js

where the plugins is located

plugins/longdomap-heatmap/longdomap-heatmap.js

how to use

1. Load Longdo API & heatmap.js before the plugin is loaded.

<script src="https://api.longdo.com/map/?key=[Your own key]"></script>
<script src="heatmap.js"></script>
<script src="longdomap-heatmap.js"></script>

2. Prepare data points.

var testData = {max: 10,data:[
	  	{lat:60.087195,lon:84.767761,value:8},
	  	{lat:41.804724,lon:-104.021301,value:4},]};

3. Prepare configuration.

var cfg = {
	  	'radius': 25,
	  	"maxOpacity": .5,
	  	"scaleRadius": true,
	  	"useLocalExtrema": true
	  };

4. Instantiate HeatmapOverlay with config below & set data.

heatmapLayer = new HeatmapOverlay(cfg);
heatmapLayer.setData(testData);

5. Add to Longdo Map.

map.Layers.add(heatmapLayer);

Demos

For those who would like to see quickly, here is links to them.

Note: turn off Adblock otherwise you cannot load heatmap.js

For sourcecode,see what is in example/longdomap-heatmap folder

data points syntax

Data points have to be defined in JSON format such as:

var testData = {max: 10,data:[
	  	{lat:60.087195,lon:84.767761,value:8,radius:20},
	  	{lat:41.804724,lon:-104.021301,value:4},]};

'radius' field is optional. The default radius is 2. If scaleRadius in config is true, it will be manipulated.

configuration

configurable values are as the same as ones of original heatmap.js. However, you cannot use container option.

  • backgroundColor
  • gradient
  • maxOpacity
  • minOpacity
  • blur
  • radius
  • scaleRadius
  • useLocalExtrema
  • ...

For more information, see: heatmap.js

Authors

  • pa7/Patrick Wied
  • original heatmap.js contributors
  • belkey

Licenses

This plugin is licensed under MIT License. (see: LICENSE file)

heatmap.js's People

Contributors

pa7 avatar belkey avatar domoritz avatar driskull avatar jorix avatar algoinfo avatar ffleandro avatar iernie avatar rnicholus avatar bhoule avatar kaze13 avatar emreberge avatar martindale avatar fredrikekelund avatar gabesmed avatar konieczkow avatar marklanz avatar mrosack avatar paalbra avatar sindresorhus avatar ikeikeikeike avatar alony avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.