This is a migrated thread and some comments may be shown as answers.

Screen Coordinates from Location

4 Answers 247 Views
Map
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 1
Michael asked on 08 May 2012, 05:50 PM
I've searched as best as I could, but there seems to be no way to go from a Location to screen coordinates.

It should be more obvious than this...

On Bing maps it is ViewportPointToLocation and LocationToViewportPoint...

4 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 08 May 2012, 05:58 PM
RadMap.SpatialReference.LogicalToGeographic
RadMap.SpatialReference.GeographicToLogical

Thanks,
Michael
0
Michael
Top achievements
Rank 1
answered on 08 May 2012, 06:31 PM
Nope, that was not it either... some kind of 'logical' point between 0 and 1? Is this the ratio of the screen coordinates or something?

I just want to convert a point on the screen to a Location and then be able to convert that Location back to a point on the screen...
0
Evgenia
Telerik team
answered on 11 May 2012, 09:40 AM
Hi Michael,

 You can use the GetCoordinates method of the Location class to achieve this. You may find a sample demonstrating it in our blogpost (How To Resize Map shapes with mouse dragging) where on MouseMove we get the coordinates of the clicked pinpoint relative to the map control screen coordinates.  

Kind regards,
Evgenia
the Telerik team
 
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
 
0
Michael
Top achievements
Rank 1
answered on 11 May 2012, 01:33 PM
I wanted to go from a geographic coordinate to a pixel location.

I found it:

Location.LogicalToPixel(RadMap, RadMap.SpatialReference.GeographicToLogical(Point());
Tags
Map
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or