Comments (3)
This worked:
import { createRoot } from "react-dom/client";
Inside the features forEach loop:
// Render a Marker Component on our new DOM node
createRoot(ref.current).render(
<Marker onClick={markerClicked} feature={feature} />
);
from mapbox-react-examples.
I'm also struggling with this at the moment. I'm trying to add popups to map markers, following the tooltip example from this repository. Haven't found a way of doing it yet without the depcrecated APIs.
from mapbox-react-examples.
Hi @billThieleMms , just to clarify, you want to add markers to the map, and when you hover over those markers, it should show a react tool-tip about the marked place, right?
from mapbox-react-examples.
Related Issues (14)
- advantage of using react wrappers with mapbox gl? HOT 1
- The images in the blog are broken HOT 2
- mapbox-gl-js 2.0 doesn't work with react HOT 1
- Adding Marker Example To The Repo HOT 3
- Unable to use mapbox-gl with webpack. HOT 1
- examples do not run under WSL2 linux with NodeJS 16
- In the markers custom example my markers are not accurate and move all over the screen HOT 1
- use React to unmount tooltip, not innerHTML
- modernize: createRef API, functional components with hooks HOT 5
- Where to add idle event in the react HOT 6
- paint.fill-color: color expected, array found in the react HOT 1
- css reference not found HOT 2
- TypeError: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createRef is not a function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-react-examples.