mapbox-gl-rs icon indicating copy to clipboard operation
mapbox-gl-rs copied to clipboard

Implement PartialEq for Map or MapFactory

Open jryio opened this issue 2 years ago • 4 comments

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.

jryio avatar Dec 06 '22 23:12 jryio