-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how are calculated values past to valueToColor ? #10
Comments
A value
where:
|
A quick answer would be to define different color values:
(I got those values from an image color picker with your goal image.) You can also set a dark theme on your map: const map = (window.map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/dark-v10',
// ...
})); However, you won't get exactly what you're looking for. This is due to blending between the heatmap and the map below. There are different possible blending functions, currently only one is used, but I'll see if that's possible to let the user define them.
Are you talking about that area? It seems a bit far from the points, are you sure it won't disappear if you increase the |
Yeah I tried those colors and the result is far from what I'm looking for. I also tried a dark style before and didn't find it good enough even if it looks good. If there are other functions for the blending that would allow me to reach my goal it wouldn't be great @Rylern !
Yes I am and I'm not sure how far it is cause it's really a small area that doesn't look to be found on the outside of n radiuses, but I could be wrong. For sure if I increase the radius it disappears but then it goes beyong my location and in this example ends up drawing in water which I don't want. |
I'll look at it in a few days.
Have you tried using the |
I just created version 1.6.0 that adds two parameters, const map = (window.map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/dark-v10',
layerBlendingFactor: WebGLRenderingContext.ONE,
mapBlendingFactor: WebGLRenderingContext.ONE,
// ...
}));
You can now also use the |
@Rylern For some reason I don't see anything when I use your new version 😢
I see the javascript console on Chrome (not in Safari but same behavior), is something missing along the script or compiled into the script ?
I tried to put those new options in
|
@Rylern 👆 |
As mentionned on #9, I wasn't able to reproduce the issue. Can you give more details on your project? Like the framework you use (e.g. React, Typescript, ...), the Mapbox version... Basically everything needed to create a minimal project reproducing the issue |
The documentation says
valueToColor: ...The function must be named valueToColor with a float parameter (which will take values between 0 and 1)..
How are my values converted from integers (in my case) to floats between 0 and 1 ?
The text was updated successfully, but these errors were encountered: