Closed hassanms closed 3 years ago
You could draw an rectangle and then use the mapbox static image api to generate an image with the bounds of the rectangle you have drawn as parameters https://docs.mapbox.com/help/glossary/static-images-api/
https://docs.mapbox.com/api/maps/static-images/#retrieve-a-static-map-from-a-style
You're probably better off looking for things in the underlying Mapbox gl rather than this library. Since mapbox-gl uses canvas you should be able to do something like this: https://www.azavea.com/blog/2018/08/29/mapbox-gl-web-map-extent-image/
Hello, first of all, I must acknowledge that this is a great library, very useful.
Coming to my concern, I want to select a specific area of the viewport and save it as an image. What I am interested in is drawing a rectangle to select an area however I don't think there is any stable library for that (or is there?) so currently, I can compromise by using the polygon. However, being a newbie, I don't know how could I get the corresponding map image of the selected area of the polygon.
Could you please help?
Image for reference: https://ibb.co/9pgMzKQ