Select to view content in your preferred language

Add KML layer to BingLayer

735
1
04-19-2010 12:13 PM
Reynaldde_Castro
Deactivated User
Has anyone added a KML layer on top of the Tiled Bing Layer?  It seems that my problem is that the projection of the Bing Tiles are in WebMercator and the KML data I want to create is in decimal degrees.  Is it possible to  reproject the Bing map to Geographic?  I have many KML layers to overlay.

I've done this using ESRI's ArcGIS Online but want to use Bing maps instead.
0 Kudos
1 Reply
DanielWalton
Frequent Contributor
Simple, one line of code. Just make sure you add the ESRI.ArcGIS.Client.Bing reference to the project with your KML classes, then inside the class that converts KML to features, replace the following:


        private MapPoint ExtractCoordinate(string coordinate)
        {
                ...
                //return mp;
                return ESRI.ArcGIS.Client.Bing.Transform.GeographicToWebMercator(mp); 
        }
0 Kudos