Replies: 2 comments
-
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/api/maps/static-images/#retrieve-a-static-map-from-a-style |
Beta Was this translation helpful? Give feedback.
0 replies
-
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/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
Beta Was this translation helpful? Give feedback.
All reactions