Questions tagged [react-map-gl]

Enhance your MapboxGL JS experience with a React-friendly API wrapper.

Generating a 3D model and integrating it with a 3D terrain display on Mapbox

My goal is to integrate a 3D model as a custom layer on Mapbox using Three.js, alongside adding a 3D terrain on the map. I have followed the documented examples for incorporating a 3D model and 3D terrain from Mapbox. The issue I'm encountering is that th ...

Displaying geometric shapes on a map in React using the Mapbox

Hi there, I am currently diving into the world of react map gl and I have encountered an issue while trying to plot a basic polygon on a map. Despite looking at various examples, I have been unable to find a proper solution. Here is the code snippet that I ...

Ensure that the Map reference object is accessible when the first modal window is displayed or opened

My issue involves a table where selecting a row should display the item's location on a map using react-map-gl in a Dialog component. However, upon clicking the row, the mapref returns null during the initial render, even though it should provide mapref ob ...

react-map-gl Popover not displaying when hovering in a React application

I've integrated react-map-gl into my Next.js application to display a Mapbox map. My goal is to have a popover appear when the user hovers over a line segment on the map. Below is the code snippet I'm using: import React from "react"; import Map, ...

What is the best way to overlay an input form component on a ReactMapGL component?

I've recently started diving into the world of React app development. My current project involves creating a react app that utilizes the ReactMapGL class from the react-map-gl library to render a map (which I implemented in a Map component). One of my goal ...

Are you experiencing issues with the cross-origin request failing in react-map-gl?

While setting up a map in react-map-gl and providing my access token, I encountered the following console error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://events.mapbox.com/events/v2?access_token= ...

The `useMap()` function consistently returns the value of `{ current: undefined }`

I've been working on a project with react-map-gl. The map itself is rendering fine, but I'm running into an issue with using useMap(). Whenever I try to use it, I always get { current: undefined } in the logs. Any suggestions or solutions? In my layout.ts ...

Error: zone.filter is not a valid function and cannot be handled

Attempting to mark a location using Mapbox GL, I've installed react-map-gl and encountered the following error: Unhandled Rejection (TypeError): zone.filter is not a function. Can someone please assist me in resolving this issue? What am I doing incorrec ...

Styling the map interface with CSS using the Mapbox Geocoder

I'm having a question regarding CSS customization for the Geocoder Search feature within my map. Despite trying to adjust its position using various methods, I haven't been successful in moving it farther down the map from the 'top-right' corner. Here's th ...