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

Custom projection

2 Answers 220 Views
Map
This is a migrated thread and some comments may be shown as answers.
Savva
Top achievements
Rank 1
Savva asked on 19 Aug 2011, 10:44 AM
Hello.
I'm looking into migrating from Google maps.
How to work with two layers (or overlays) with different projections?
For example, I need EPSG:3857 (like OpenStreetMap) and EPSG:3395 (like Yandex Maps) on one map.

In Google maps api I had to create Custom Projection and implement fromLatLngToPixel and fromPixelToLatLng, then create custom Tile Layer and implement loadTile.

Could you provide an example?
Thank you.

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 24 Aug 2011, 01:47 PM
Hello Savva,

Technically it is possible to show two tile layers using different map providers. The RadMap.Providers collection allows to add multiple map providers. For more information you can take a look at the following documentation topic and example:
http://www.telerik.com/help/silverlight/radmap-features-providers.html#Bing_Traffic
http://demos.telerik.com/silverlight/#Map/TrafficProvider

But when the map tiles are represented in different projections then they couldn't be overlayed properly.
If you mean that you need to use these layers to display shapes (like to ESRI shape-files) which have different projections, then you should use coordinate converters.
The map control uses the information layers to display shapes.
http://www.telerik.com/help/silverlight/radmap-features-information-layer.html

The shapes should be represented in coordinates of the projection of the map provider which is first in the Providers collection. Or when you use the shape-file for other projection then it should be read using appropriate coordinate converter.
Currently Geospatial data can be represented using the following projections which are supported by the map control:
- The Mercator projection EPSG:4326 (default) that refers to WGS84 as (latitude, longitude) pair coordinates in degrees
- The OSGB-1936 projection which also known as EPSG:27700
- The EPSG:900913 projection which also known as EPSG:3857 and Pseudo-Mercator projection that refers to WGS84 as (latitude, longitude) pair coordinates in meters

Also the map control contains two built-in converters: EPSG900913Converter and OSGB36Converter classes. You can use them for converting geospatial data to Mercator projection (EPSG:4326). Also you can design your own custom converter. For more information you can take a look at the following documentation topic:
http://www.telerik.com/help/silverlight/radmap-features-shapefiles-support.html

Best wishes,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Massimo
Top achievements
Rank 1
answered on 17 Feb 2017, 05:59 PM
Did you succeed?
Tags
Map
Asked by
Savva
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Massimo
Top achievements
Rank 1
Share this question
or