Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

318
Views
OpenLayers - Mapa de calor | Anular el cálculo del peso de superposición predeterminado

Estoy tratando de implementar un mapa de calor de OpenLayers para visualizar algunos datos en un mapa. Mi objetivo es mostrar puntos de mapa de calor con pesos dados. Actualmente mi código poc se ve así:

 const features = [ { lat: 46.934942, lon: 17.891804, id: 10, value: 6.5 }, { lat: 46.93489, lon: 17.892713, id: 11, value: 5.2 }, { lat: 46.934662, lon: 17.892331, id: 12, value: 5.9 }, ].map((item) => { const feature = createFeature({ lon: item.lon, lat: item.lat, id: `${item.id}`, customStyle: new olStyle.Style({ image: new olStyle.Circle({ radius: 5, fill: new olStyle.Fill({ color: "#AB1F58", }), }), }), }); feature.setProperties({ value: item.value }); return feature; }); const newLayer = new olLayer.Heatmap({ source: new olSource.Vector({ features, }), blur: 0, radius: 50, weight(feature) { return feature.getProperties().value / 10; }, }); map.addLayer(newLayer)

Imagen de ejemplo

Mi problema es que OpenLayers suma los valores cuando las características se superponen, pero me gustaría que el área de superposición tuviera el valor promedio .

¿Es esto posible o debo buscar otra solución?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Una forma en la que puedo pensar es mediante el uso de una fuente Cluster . Escriba su propia función createCluster para devolver una nueva característica con un valor promedio y mostrarla.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!