Code Monkey home page Code Monkey logo

Comments (6)

Sti2nd avatar Sti2nd commented on July 1, 2024 2

Oh well, I guess my assumptions were wrong or it might be a bug somewhere.

I see there are quite a few issues about heat colour, and a some pull requests as well... #78

Since this repo is not actively maintained anymore, your best shot is perhaps to modify the source by e.g. basing it off the already existing pull requests.

from leaflet.heat.

Sti2nd avatar Sti2nd commented on July 1, 2024

I don't think it is a built in feature. A workaround could possibly be: If each of these points have an intensity of 0.0001 you could input these five colours and set max point intensity to 0.5.

NB: I have not read the actual source code. This assumes the colours in the heatmap is simply calculated from the sum of point intensities in the grids it creates. Meaning, If there are 5000 points in one square of the grid, that square should get intensity 5000 * 0.0001 = 0.5, which will be mahogany. We also have to assume the range is divided equally between the five colours. If you check the source code you can find out if the assumptions are true.

from leaflet.heat.

jericopulvera avatar jericopulvera commented on July 1, 2024

@Sti2nd thanks. I'll try this.

from leaflet.heat.

jericopulvera avatar jericopulvera commented on July 1, 2024

Doesn't work. All I get is mahogany and I have 296 heats. It should return yellow.

from leaflet.heat.

Sti2nd avatar Sti2nd commented on July 1, 2024

Well, it does depend on your zoom level or how large the clusters in the grid are in the source code.

You only have 296 points on your map? And all points have intensity 0.0001?

from leaflet.heat.

jericopulvera avatar jericopulvera commented on July 1, 2024

@Sti2nd yeah. But I am not getting yellow. I tried it in all zoom value. all mahogany

from leaflet.heat.

Related Issues (20)

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.