amay077 / Xamarin.Forms.GoogleMaps

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

Position and rotation of GroundOverlay #592

Open Sonnenspeer opened 5 years ago

Sonnenspeer commented 5 years ago

Hi.

I have a question about how to correctly position and rotate a ground overlay at the same time.

The ground overlay in the Android implementation uses Bounds and Bearing to position and rotate a ground overlay. So I tried overlay a building with an image and use two coordinate points (North-West and South-East) as the bounds with a bearing value that was calculated out of those two points.

The bearing itself is correct and the overlay rotates corretly. But using the bounds the ground overlay first positions the image and tries to calculate the width and height of the overlay without respecting the bearing so that the result is a wrong positioned and sized overlay.

This is how it looks like without a bearing: pos

This is with bearing: bearing

And this is the expected result: expected

How can I accomplish that?

Sonnenspeer commented 5 years ago

Anybody got this problem before and could solve it? :/