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

Coordinate Values Format in Map Control

1 Answer 315 Views
Map
This is a migrated thread and some comments may be shown as answers.
Lou
Top achievements
Rank 1
Lou asked on 10 Aug 2010, 07:52 PM
I have just started using the Rad Map control. I am using the Bing Map Provider. As far as I can tell when using the spatial reference "MercatorProjection" the only way to provide a latitude or longitude value in the loation object is to use the Geographic Coordinate System value, not the Projected vlaue. For example I would use the pair  "42.358431,-71.059773" instead of "4640731,-8854878". I would prefer to use the Projected values, is that possible? Thanks.

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 11 Aug 2010, 12:37 PM
Hello Lou,

The map control allows using the Geographic Coordinate System only.
It supports translation the geographic coordinates to logical coordinates (from 0 to 1). Also it allows getting the pixel coordinates for current viewport of map from the geographic or logical coordinates and vice versa.

The SpatialReference property of RadMap has the following methods:
GeographicToLogical(Location) -- Converts a geographical coordinate (Longitude, Latitude) to a logical Point (0->1).
LogicalToGeographic(Point) -- Converts a logical Point (0->1) to a geographical coordinate (Longitude, Latitude).

The Location class contains the following functionality:
GetCoordinates(RadMap, Point) -- Gets geographic coordinates of the point relative to the map control screen coordinates.
LogicalToPixel(RadMap, Point) -- Convert a logical point to a Pixel Point on the current screen at a particular zoom level.
PixelToLogical(RadMap, Point) -- Convert a pixel point to a Logical Point on the current screen.
GetPoint(RadMap) -- Gets location of the Location structure on the given RadMap control as Point relative to the size of the control.

Sincerely yours,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Lou
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or