JamesLMilner / terra-draw

A library for drawing on maps that supports Mapbox, MapLibre, Google Maps, OpenLayers and Leaflet out the box
https://terradraw.io
MIT License
447 stars 50 forks source link

[Roadmap] Road to v1! #259

Open JamesLMilner opened 3 months ago

JamesLMilner commented 3 months ago

Firstly, hello anyone reading or following the repository. It's come to my mind that Terra Draw will be two years old in July, and we are still tagged in Alpha. Although this a very deliberate decision, to allow quick iteration and avoidance of the limitations of attempting to adhere to semantic versioning, I am conscious that it is realistically going to be putting people off using the library.

As such I'd want to lay out a roadmap to what a v1 iteration would look like. For me there are three main issues:

  1. Allowing validations across both drawing and selecting modes (essentially #256 as we have validation in select mode already). I personally feel like the validations provide an open ended mechanism for people to allow or prevent drawing or editing of any shape in any way they see fit. We could also expose common validations that the community uses in the future.

  2. Providing at least the foundations of a standardised approach to how we handle Web Mercator vs Globe based drawing. I am still working out how might be best to approach this, either at a global level (i.e. you pass a flag to Terra Draw, and then all operations will be geodesic) or if it should be more granular (i.e. a flag we pass at the mode level). There are lots of things to consider here, as an example someone may want to draw on a Web Mercator map but draw a geodesic line (i.e. via TerraDrawGreatCircle mode). Another example of such trickiness would be what the default behaviour should be - in TerraDrawCircleMode geodesic and Web Mercator circles would result in very different looking geometries when projected back and forth, which is confusing to some users (i.e. at the moment we have a geodesic circle by default, but perhaps some users expect it to be a perfect Web Mercator circle?). This issue is mostly capture by #23 but it needs fleshing out a little bit to capture the full scope.

  3. Trying to bullet proofing what already exists. Essentially we want to make sure Terra Draw is as bug free and painless to use as possible. Of course, an incredibly tough endeavour, but with a combination of working on the unit and end-to-end testing and the user documentation, I am confident we can get to a good position.