-
Notifications
You must be signed in to change notification settings - Fork 102
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
setRotationAngle with react-leaflet #23
Comments
@ziapk this is due to a problem of 'react-leaflet' v2, which doesn't export exension methods of the classes anymore. See PaulLeCam/react-leaflet#506 |
Hi @ziapk, Try this, it's a bit of a hack I think, well the idea is to create a component using react-leaflet marker and set the angle for that marker. I currently used this, been struggling integrating libraries using react-leaflet. Hope this helps
|
@madchester I modified your code to create a more type safe version for typescript.
Then, call it as such:
|
Hello!
I am using react-leaflet maps here are my marker code.
<Marker key={1} position={{ lat: position.latitude, lng: position.longitude }} rotationAngle={position.course} rotationOrigin="center" icon={L.icon({iconUrl: "xyz.svg", iconSize: [50,50], iconAnchor: [25, 25]})} />
position data update frequently but marker rotation didn't update after loading of map.
I don't know how to use
setRotationAngle
here.please give me any example for way in react-leaflet
Thanks
The text was updated successfully, but these errors were encountered: