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

Custom Tiles

1 Answer 75 Views
Map
This is a migrated thread and some comments may be shown as answers.
Tavi
Top achievements
Rank 1
Tavi asked on 12 Jan 2011, 10:43 AM
Hi,
I am trying to use the map  control to display our custom map so  I created a DeepZoomTilesProvider.  I use: 
        public override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            string tileFileName = string.Format("{0}/{1}_{2}.png", tileLevel, tilePositionX, tilePositionY);
            tileFileName = Path.Combine(this.TileLocation, tileFileName);
            return new Uri(tileFileName, UriKind.RelativeOrAbsolute);
         } I can show the custom map on the control but when I try to put a MapPinControl on the InformationLayer it show on an different position from the original XY coordinate (before cutting the map with Deep Zoom Composer). I suspect is something about Mercator projection but I can’t figure out how to transform the planar coordinates XY to Mercator before calling MapPinControl.
Thanks in Advance. Tavi

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 14 Jan 2011, 05:30 PM
Hello Tavi,

The translation from Latitude/Longitude coordinates to the screen point involves a lot of calculations which uses current projection (Mercator), viewport parameters and so on.  All this things are implemented internally in the RadMap control. It gives right visual position for map tiles which have been created for Mercator projection. I suppose that your original map have been created for different projection. In this case it can’t be used with information layer. I.e. the map tiles will be shown, but they will be located in the wrong geographical positions. You can use map tiles which have been create for Mercator projection only (many map images around the world have been created for different projections).

All the best,
Andrey Murzov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Map
Asked by
Tavi
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or