RadMap coordiantes for each corner

1 Answer 19 Views
Map
Ammar
Top achievements
Rank 1
Ammar asked on 29 Oct 2021, 03:21 PM | edited on 29 Oct 2021, 07:45 PM

Hi guys,

I would like to get the 4 coordinates for the displayed map on RadMap

Top Right (x, y) , Top Left  (x, y) , Bottom Left (x, y) , Bottom Right  (x, y) 

those values should change different when a user zoom in/out, or move the map with mouse.

is there a way to do that?

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Nov 2021, 11:19 AM
Hello, Ammar,

The MapElement.ViewportChanged event allows you to detect when the map view is changed. In the ViewportChangedEventArgs you have access to the Viewport from where you can get its Center property giving you the center PointG. The CenterPixel gives you the center PointL. The Viewport offers the Viewport property which returns the RectangleG of the current view. Thus, you can get the necessary information for the map boundaries, e.g. by using the Viewport.Viewport.NorthWest and Viewport.Viewport.SouthEast properties. The Viewport also offers the ViewportInPixels property giving the RectangleL (viewport in pixels).

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ammar
Top achievements
Rank 1
commented on 04 Nov 2021, 08:57 PM

Thanks Dess. This certainly helps. Very useful. Much appreciated
Tags
Map
Asked by
Ammar
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or