mapbox-gl-rs
mapbox-gl-rs copied to clipboard
Implement PartialEq for Map or MapFactory
When using mapboxgl
inside of a Yew app, it would be helpful to pass around MapFactory
or Map
as props to other components so they can manipulate the map in different ways. Yew requires that props implement Properties
and PartialEq
.
Additionally, in order to take a map instance and pass it into a Yew context provider like use_context
, the type must implement ParitalEq
(docs for use_context).
Global state management crates for Yew like bounce also require that the shared value be ParitalEq
.
This will allow the mapbox gl instance to be used outside of the context where it was initialized.