Solved

Viewing KML in Bing Maps

Posted on 2010-09-16
5
3,334 Views
Last Modified: 2012-05-10
Hi,

Can anyone tell me how to view a KML in an earth Browser other than Google Maps?

Thanks,

0
Comment
Question by:Techsavy
  • 3
5 Comments
 
LVL 13

Expert Comment

by:Molnar István
ID: 33699220
you can use bing maps to view kml like this:

"http://www.bing.com/maps/?mapurl=" + "kml_file_location"
0
 
LVL 13

Expert Comment

by:Molnar István
ID: 33699294
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
0
 

Author Comment

by:Techsavy
ID: 33704675
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.RelativeToGround), 10, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 1);
    var shapeLayer = new VEShapeLayer();
    var shapeSpec = new VEShapeSourceSpecification(VEDataType.ImportXML, "https://mysite/doc.kml", shapeLayer);
    map.ImportShapeLayerData(shapeSpec);
</script>
</div>
</body>


Please let me know how else I can achieve this. Thanks,




0
 
LVL 13

Expert Comment

by:Molnar István
ID: 33708089
0
 
LVL 5

Accepted Solution

by:
mrfixit22 earned 500 total points
ID: 33749754
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now