zakjan / mapbox-gl-draw-geodesic

Geodesic plugin for Mapbox GL Draw
https://zakjan.github.io/mapbox-gl-draw-geodesic/
MIT License
52 stars 8 forks source link

Readme not Beginner Friendly #18

Open nlintas opened 2 years ago

nlintas commented 2 years ago

My opinion as a new developer to GIS systems and Mapbox is that this libraries readme can be improved. Up to this point, I understand how to do to add them in.

let modes = MapboxDraw.modes;
modes = MapboxDrawGeodesic.enable(modes);
modes = MapboxDrawWaypoint.enable(modes);
const draw = new MapboxDraw({ modes });

I am not interested in the geojson or static functionalities in my case, only looking for a method to use the circle functionality. However, from here on I have no idea how to access the methods I need to create a circle as shown in the demo. I am currently investigating the code directly of your example to get a grip, but I don't believe that's the best approach for this. A minimal example should be in the readme, in my opinion.

zakjan commented 2 years ago

Hi, this library is a plugin for mabox-gl-draw. Have you registered it with addControl to your map? There should be draw controls displayed. Geodesic drawing triggers when drawing features with Draw controls.