-
Notifications
You must be signed in to change notification settings - Fork 33
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
React Leaflet V3 #40
Comments
Any news about V3 integration? |
+1 |
2 similar comments
+1 |
+1 |
'MapControl' is not exported from 'react-leaflet'. |
I started looking into this, but it's not as trivial as I first thought. It looks like the new way of doing things is that react-leaflet-search needs to be a Child component. Child components can only be used as descendants of a MapContainer component. As-in, a descendant in HTML tag terms, not inheritance. So, one could inherit from a Component rather than a MapControl. But then you need to get access to the Leaflet map object, which seems to be via a useRef hook (https://react-leaflet.js.org/docs/api-components#referenceable-behavior) unless there's another way. You'd also need to reimplement the (small amount of) location logic in the original MapControl class. There's likely a bit more to it than that, so I'm parking this for my use-case for now, as I've ended up six levels deep trying to fix a different issue... |
thanks @pranav-ted |
1 similar comment
thanks @pranav-ted |
It does not include all the options we have here and it also is weak on types. |
Any progress on this?
|
Uncaught TypeError: Class extends value undefined is not a constructor or null
at Module../node_modules/react-leaflet-search/lib/ReactLeafletSearch.js
The text was updated successfully, but these errors were encountered: