Custom Tiles

2 posts, 0 answers
  1. Tavi
    Tavi avatar
    1 posts
    Member since:
    Dec 2010

    Posted 12 Jan 2011 Link to this post

    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
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 14 Jan 2011 Link to this post

    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>>
Back to Top