Code Monkey home page Code Monkey logo

Comments (8)

Guitlle avatar Guitlle commented on July 19, 2024

Hi @danielfox , my pull requests (issue #8 ) shows a relative heat map based on the minimums and maximums of the visible points instead of the zoom. I tested it with random data and looks good for few points
urban data3

from leaflet.heat.

ryansit avatar ryansit commented on July 19, 2024

+1, a relative heatmap would be a huge improvement

from leaflet.heat.

RobbieTheWagner avatar RobbieTheWagner commented on July 19, 2024

I noticed after updating to the new version, our heat didn't look very good. It's related to this issue. Why was https://github.com/Leaflet/Leaflet.heat/blob/gh-pages/src/HeatLayer.js/#L145 changed? It used to be:

alt = this._latlngs[i].alt || this._latlngs[i][2];
      k = alt || (1 * v);

Why is this._latlngs[i][2] no longer supported?

@mourner, if there is not a pressing reason for it to have been changed, would you accept a PR to put it back? If there was a reason, we'll need to restructure all of our data. Please let me know.

from leaflet.heat.

mourner avatar mourner commented on July 19, 2024

Why is this._latlngs[i][2] no longer supported?

It's accidental probably. There's a pull for this already: #20
Will merge soon.

from leaflet.heat.

RobbieTheWagner avatar RobbieTheWagner commented on July 19, 2024

Okay, awesome. Thanks!

from leaflet.heat.

fredericbonifas avatar fredericbonifas commented on July 19, 2024

Hi,

At his line, I don't understand why we take the minimum between the cell's value and 1:
https://github.com/Leaflet/Leaflet.heat/blob/gh-pages/src/HeatLayer.js/#L172

Shouldn't it be

Math.min(cell[2], this.options.max)

instead of

Math.min(cell[2], 1)

?

from leaflet.heat.

torfsen avatar torfsen commented on July 19, 2024

@fredericbonifas: I think so, too. The change works for me, so here's a minimal pull request.

from leaflet.heat.

torfsen avatar torfsen commented on July 19, 2024

@mourner: That was quick 👍

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.