React friendly API wrapper around MapboxGL JS.
Questions tagged [react-map-gl]
291 questions
0
votes
0 answers
Mapbox-gl list all types
I have a map box implementation and it is using a source of type vector do add a few layers and then do some clustering. It uses react-map-gl, but from what I am understanding it will have to use mapbox-gl to do the clustering bit.
The tiles that…

Comum
- 453
- 5
- 21
0
votes
1 answer
MapBox pins don't render
I am following a guide step by step building a MapBox map component with markers on it. I am using React for this, and unlike the guide, I am using typescript.
I am using the react-map-gl as well. I got to the point of rendering markers, and unlike…

Tsabary
- 3,119
- 2
- 24
- 66
0
votes
1 answer
Is there a draw event for a single click of a feature in mapbox-gl-draw?
I'm playing around with react-map-gl and mapbox-gl-draw to draw polygons on to my map
I'm wondering if there is a better way to get the details of a selected feature on click, rather than using the draw.selectionchange event? This event handles…

Saterz
- 33
- 5
0
votes
1 answer
Point, Line, Polygon with popups using React Map Gl
I need to add 3 types of elements to the map based on the existing array (point, line, polygon). For each of them, I want to output information from the tooltip field when clicked.
type Props = {
data: ReportWidget;
id: string | number;
…

t0rum
- 3
- 1
0
votes
1 answer
Why does the Geolib package's getCenter() function return Type 'false | { longitude: number; latitude: number; }'
As shown on the geolib package website the geolib getCenter() function is supposed to return an object like below:
{ latitude: 52.516272, longitude: 13.377722 }
The function I have written is:
const centerMap = getCenter([markerLocation,…

Ruairidh Grass
- 37
- 5
0
votes
0 answers
react-map-gl - adding a radius circle to the canvas
I am trying to add a radius circle using Layer to MapboxGL using React, however, I can't figure out how to have it fit to the bounds of the canvas. In other words, I need to add a static layer inside of the canvas that keeps the same dimensions when…

Kyle Underhill
- 89
- 15
- 43
0
votes
0 answers
Overloay is not visible in fullscreen mode
I have Map page which includes the Overloay after click on Setting button
And another button which display the complete map in fullscreen mode
Below is my code :
const [show, setShow] = useState(false);
const [target, setTarget] =…

Developer007
- 37
- 5
0
votes
1 answer
Custom threebox layer for react-map-gl
I am trying to add a custom 3D object to my react-map-gl instance. Unfortunately, I can't find any examples that have successfully implemented this besides mapbox-gl-threelayer. This package is a bit outdated for my needs- it relies on an v1…

bitTorin
- 1
- 1
0
votes
0 answers
MapboxglSpiderifier in NextJs (react-map-gl)
I am using Map from react-map-gl to display several markers in a map. I also use Layers and Source to have my markers in clusters. But I have a problem because I can have multiple points with the exact same coordinate and those points end up…

Sofia
- 445
- 4
- 17
0
votes
0 answers
React: "Cannot update a component (`Map`) while rendering a different component (`InteractiveMap`)." When using react-map-gl
I'm trying to use react-map-gl library to make a route of public transportation. I've found an example code to make a route that goes like this (Map.js):
import MapGL, { CanvasOverlay } from 'react-map-gl';
import React, { useState, PureComponent }…
0
votes
1 answer
In react js how do I link my map data with different links for each image
{
id: 1,
name: 'Anna',
image: one,
price: '0.1ETH',
href: "http://www.google.com/",
},
{
id: 2,
name: 'Unikorean',
image: two,
price: '0.2ETH',
href: "http://www.gmail.com/",
…

Haider Ali
- 1
- 2
0
votes
0 answers
I get an unknown error when using react-map-gl
I'm currently working on the latest version of Bun.js and I'm currently working on the latest version of React and react-map-gl .
I am getting an error even though I have only loaded a component called Map . What causes these errors to…

Chebread
- 51
- 7
0
votes
0 answers
Mapbox's map isn't showing up
I am trying to load up a simple map for web developmemt project for class. However, when inserting the api key, it only shows a white screen and a Mapbox button which navigates back to their site. I've checked in the console and there are no errors.…

Indigo Jones
- 9
- 1
0
votes
1 answer
How do I make my input radio button work correctly with my react list?
I have a list of objects displaying on the frontend, along with a radio button.
When a user checks a radio button, the corresponding object details get stored in a form field.
The problem is all my radio buttons are checking, which means users can…

Yetunde
- 1
0
votes
0 answers
How to load geojson data on React google map api and detect user click
i am implementing @react-google-maps/api package to draw google map on my React application, Now i have loaded geoJson its working fine. Now the requirement is i need to check whether the user click inside the geoJson data or outside and show that…

Andaman
- 295
- 3
- 10