amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
545 stars 346 forks source link

Generate a static map image #751

Open orwo1 opened 3 years ago

orwo1 commented 3 years ago

SUMMARY

I want to be able to generate a static image of the map from code.

DETAILS

Just like using url https://maps.googleapis.com/maps/api/staticmap?parameters to get a static image of the map, I would like to use the map control to get an image of the map.


// How to use of your requested feature
I would like to have a map control with applied styles and templates for pins and shapes, and to call it to generate a static map image.
mapControlInstance.GetStaticMap(Point CenterPoint, int ZoomLevel, List<ShapeBaseClass> Shapes, List<Pin> pins).

### PLATFORMS

<!-- which platform do you want? -->

- [x] Android
- [x] iOS
- [x] UWP
starl1n commented 3 years ago

Probably this could guide you to the proper direction?

Is like taking a screenshot of the View, right?

https://www.xamarinhelp.com/taking-a-screenshot-in-xamarin-forms/

orwo1 commented 3 years ago

Probably this could guide you to the proper direction?

Is like taking a screenshot of the View, right?

https://www.xamarinhelp.com/taking-a-screenshot-in-xamarin-forms/

Thanks, this looks like a way to do it. My goal is just to display a static image of the map, and not the map control itself (the user won't be able to use it on that view). I wonder if I could somehow create this screenshot without the control being actually displayed?