mark-p-thomas : GIS.ly Track Updates

Sections

GeoJSON Updates

When a manager performs work on a Track object, even with modifications of the Polyline Track, the GeoJSON object need not be updated. This can be useful for easier rollback of units of work, as well as saving histories of GeoJSON states, among other things.

When it is time to actually update the GeoJSON object that is displayed in the React-Leaflet Map component, either for updating the view the user sees, or for file writes, the Track object will synchronize the GeoJSON object via it’s wrapper to the Polyline state.

updateFromTrack

This method gets the updated GeoJSON object from the Track object, as well as some other state properties for convenience, such as view bounds. This data is then set to the appropriate component state hook.

Note that this method DOES NOT update the GeoJSON object - just the component state. The GeoJSON object should either be updated during changes by a Track manager, or manually.