Issue
Hi everyone I am working on a map using the following package Xamarin.Forms.GoogleMaps. This is my first time working with google maps, and I am wondering if I can retrieve the 4 corners of a user's visible region of the map. More specifically I need to retrieve the Lat and Long on each corner.
I am trying to get all the visible locations of the map at a given time so when a user clicks on a Pin within this region it will Navigate them to a different screen where they can see all these locations but in list view. Organized by the Location they selected at the very top and the rest following. This list would change if the user zooms in/out or moves the map.
I did some reading where I could get the bounds of the map but how could I retrieve coordinates from those bounds? I've done the following:
map.Bounds.Top, map.Bounds.Bottom, map.Bounds.Right, map.Bounds.Left
But I get stuck there. Is there another way?
Solution
use Region - it defines the geo coordinates of the 4 corners of the visible map area
- map.Region.FarLeft
- map.Region.FarRight
- map.Region.NearLeft
- map.Region.NearRight
Answered By - Jason
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.