I have a vector tileset (e.g. all the countries in the world).
Separately, I am running a query that gets a count for each country (e.g. how many times has X occurred in a given country).
Using the query response data, I create a choropleth of the…
I am having a GeoJson data and I am displaying it in map using Source and Layer using React-Map-GL, now I want to relocate the position by dragging but I dont know how to do in React? and this is my code
I've got a map style set up in Mapbox Studio. This style contains a layer with markers. I want to be able to click on this layer in my React project using react-map-gl.
In any other situation i would do something like
map.on('click', 'needed-layer',…
So I created a flat HexagonLayer and have various interactions tied to the onClick prop as shown below.
My goal now is to modify the individual column that was clicked by adding an outline, changing the color for that column, or something else…
I am using react-map-gl as React wrapper for mapbox to draw maps on the screen. I want to add a line into the map. I can achihve this in leaflet using Polyline component.
EXAMPLE
routes = data.map((points, i) => (
Can someone help me with this error
I am using filters on a layer like so:
this gets triggered during a mapbox-gl-draw operation
map.setPaintProperty('postcodes', 'fill-color', '#e37d10');
map.setFilter('postcodes', ['in', ['get', 'name'],…
I'm trying to add the Editor to my map, but the moment I import "react-map-gl-draw", I get the following error and I can't find anything on it. When I remove the editor, the error is gone and I can see the map.
Can someone give me some direction for…
I'm quite new to React and JavaScript, am trying to write a queryRenderedFeatures filter for my React Hooks project using React-Map-gl.
The project has a huge list of data, and what I'd like to do is only filtering the data that appears within the…
I am working on a React webapp that is utilizing an interactive map visualization feature. We are using deck.gl libraries and react-map-gl. React Map GL is defined by Deck GL as a "A React wrapper around Mapbox GL which works seamlessly with…
So I'm currently working on Deck.gl and React and I need to load a geojson file which has an additional property named "floors" or something similar which tells how many floors the building has.
Is there any way to extrude alternating floors…
I would like to present a point cloud of lidar data over a static map in deck.gl.
There is an example of a point cloud positioned on a map in the deck.gl docs. But from the code it isn't clear to me how the example point cloud is georeferenced. …
Using react-map-gl I'm unable to overlay my custom sources/layers on top of a predefined style template. When passing the style prop to the map component I am able to add either the template or my custom sources/layers, but not both at once. Here's…
I'm working to load a Mapbox map using Uber's react-map-gl library. I have successfully loaded the map with custom markers via JSON served from my API (as you can see from this first image).
If you look at the green marker near Houston though, it's…
I have created a map using react-map-gl. Whenever I zoom or pan on the map, the viewport updates as the onViewStateChange prop calls an _updateViewPort function which sets the new state. The issue I am having is, when I zoom into somewhere using…
I calculated the subtotal with child component by passing the arguments as I could not calculate in the parent component itself.
Here I used map method for form input. Now I need to calculate the total of subtotal.
if I could get a array of all…