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

228
Views
El folleto del mapa de calor no puede generar un color degradado

Tengo un ejemplo de un mapa de calor de volante simple con datos de la API. Pero no genera un mapa de calor degradado como debería.

ingrese la descripción de la imagen aquí

tiene que pensar en los índices de gradiente (0.0 a 1.0) como un cursor del 0% al 100% de su intensidad máxima

 const body = { f: "json", returnGeometry: true, rollbackOnFailure: true, geometry: JSON.stringify({ xmin: bounds.west, ymin: bounds.south, xmax: bounds.east, ymax: bounds.north, spatialReference: { wkid: 4326 }, }), geometryType: "esriGeometryEnvelope", };

Y GeoJSOn:

 <GeoJSON ref={geoJsonLayer} data={props.data} onEachFeature={onEachState} pointToLayer={heatmapToLayerState} />

Esa pointToLayer={heatmapToLayerState} de los datos:

 import L from "leaflet"; const CustomMarker = (latlng) => { const iconMarker = new L.Icon({ gradient: { 0.2: '#ffffb2', 0.4: '#fd8d3c', 0.6: '#fd8d3c', 0.8: '#f03b20', 1: '#bd0026' } }); return L.marker(latlng, { icon: iconMarker, }); }; export const heatmapToLayerState = (_, latlng) => { return CustomMarker(latlng); };
about 4 years ago · Juan Pablo Isaza
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!