Techsavy
asked on
Viewing KML in Bing Maps
Hi,
Can anyone tell me how to view a KML in an earth Browser other than Google Maps?
Thanks,
Can anyone tell me how to view a KML in an earth Browser other than Google Maps?
Thanks,
for example:
let the kml location : http://www.holidaycreations.com/reps.kml
then: http://www.bing.com/maps/?mapurl=http://www.holidaycreations.com/reps.kml
if you are making an asp.net app this article can help:
How to display KML / KMZ files using Bing Maps (Virtual Earth)
hope it helps
let the kml location : http://www.holidaycreations.com/reps.kml
then: http://www.bing.com/maps/?mapurl=http://www.holidaycreations.com/reps.kml
if you are making an asp.net app this article can help:
How to display KML / KMZ files using Bing Maps (Virtual Earth)
hope it helps
ASKER
Hi,
I tried this approach" but my KML File location is in HTTPS
i.e http://www.bing.com/maps/?mapurl=https://www.mysite.com/reps.kml
And bing reports that the content has been removed. So may be SSL is the problem. How can we address this?
Thanks,
Alternatively, I tried using a AJAX Bing map control :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3&mkt=en-us">
</script>
<title>Untitled Page</title>
</head>
<body>
<div id='myMap' style="position:absolute; width:400px; height:400px;">
<script type="text/javascript">
var map = new VEMap('myMap');
map.LoadMap(new VELatLong(47.6, -122.33, 0, VEAltitudeMode.RelativeToG round), 10, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 1);
var shapeLayer = new VEShapeLayer();
var shapeSpec = new VEShapeSourceSpecification (VEDataTyp e.ImportXM L, "https://mysite/doc.kml", shapeLayer);
map.ImportShapeLayerData(s hapeSpec);
</script>
</div>
</body>
Please let me know how else I can achieve this. Thanks,
I tried this approach" but my KML File location is in HTTPS
i.e http://www.bing.com/maps/?mapurl=https://www.mysite.com/reps.kml
And bing reports that the content has been removed. So may be SSL is the problem. How can we address this?
Thanks,
Alternatively, I tried using a AJAX Bing map control :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3&mkt=en-us">
</script>
<title>Untitled Page</title>
</head>
<body>
<div id='myMap' style="position:absolute; width:400px; height:400px;">
<script type="text/javascript">
var map = new VEMap('myMap');
map.LoadMap(new VELatLong(47.6, -122.33, 0, VEAltitudeMode.RelativeToG
var shapeLayer = new VEShapeLayer();
var shapeSpec = new VEShapeSourceSpecification
map.ImportShapeLayerData(s
</script>
</div>
</body>
Please let me know how else I can achieve this. Thanks,
you can try to replace the https with http
see also:
http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/9e699faf-9cff-42a8-9e6e-51fcea605dd6
http://social.msdn.microsoft.com/forums/en-us/vemapcontroldev/thread/A9A2CA7C-0B99-4D13-915C-FE12E1A1EAB4
hope it helps
see also:
http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/9e699faf-9cff-42a8-9e6e-51fcea605dd6
http://social.msdn.microsoft.com/forums/en-us/vemapcontroldev/thread/A9A2CA7C-0B99-4D13-915C-FE12E1A1EAB4
hope it helps
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"http://www.bing.com/maps/?mapurl=" + "kml_file_location"