mapbox-maps-flutter icon indicating copy to clipboard operation
mapbox-maps-flutter copied to clipboard

Problem with HeatmapLayer color parameter

Open ramyassaf opened this issue 2 years ago • 1 comments

The colour value set to the parameter heatmapColor in HeatmapLayer is making all the map covered with a solid colour, screenshot attached.

await mapboxMap.style.addSource(GeoJsonSource(id: 'heatmap', data: "https://www.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson"));

await mapboxMap.style.addLayer( HeatmapLayer( id: 'heatmap_layer', sourceId: 'heatmap', // visibility: Visibility.NONE, minZoom: 1.0, maxZoom: 20.0, heatmapColor: 0xffFf000d, heatmapIntensity: 0.4, heatmapOpacity: 0.4, heatmapRadius: 0.2, heatmapWeight: 0.4, ), );

Screenshot_1689867288

ramyassaf avatar Jul 20 '23 15:07 ramyassaf

Bumping this issue. The in-line documentation statesheatmapColor Should be an expression that uses ["heatmap-density"] as input. However unlike native SDKs which seem to take in a function that allows changing the colour based on the density, the Flutter SDK only accepts an int?. @yunikkk is this expected ?

aguadoenzo avatar May 14 '24 13:05 aguadoenzo