kamaltilak / geoxml3

Automatically exported from code.google.com/p/geoxml3
0 stars 0 forks source link

unable to retrieve kml #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. created a new myplaces map using maps.google.co.uk 
(https://maps.google.co.uk/maps/ms?msid=206524762946825961514.0004dce73037ec5216
748&msa=0)

2. used the following code to attempt to display my myplaces map in an imbedded 
google map using the google maps api:

<!DOCTYPE html>
<html>
  <head>
    <title>Flarpy Map</title>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">

    <style>
        html, body, #map-canvas 
        {
            margin: auto;
            height: 400px;
            width: 400px;
        }
    </style>

    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script src="geoxml3.js"></script>

    <script>
        var map;

        function initialize()
        {
            var mapOptions =
            {
                zoom: 12,
                center: new google.maps.LatLng(52.641605, -1.139889),
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };

            map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
        }

        google.maps.event.addDomListener(window, 'load', initialize);

        var geoXml = new geoXML3.parser({map: map});
        geoXml.parse("https://maps.google.co.uk/maps/ms?msid=206524762946825961514.0004dce73037ec5216748&msa=0&output=kml");
    </script>

  </head>

  <body>
    <div id="map-canvas"></div>
  </body>

</html>

3. Uploaded the code to my server (http://sonodrome.co.uk/flarp.html)

What is the expected output? What do you see instead?

I was expecting geoxml3 to retrieve the *.kml file and display the placemarks I 
saved in my myplaces google map. Instead the placemarkers did not appear and 
the readout from my webconsole indicates that geoxml3 was: "Unable to retrieve 
https://maps.google.co.uk/maps/ms?msid=206524762946825961514.0004dce73037ec52167
48&msa=0&output=kml"

What version of the product are you using? On what operating system?

Im using geoxml3 - Revision 100
Firefox version 20.0
Mac OSX version 10.8.3

Please provide any additional information below.

I have tried loading the *.kml file from a local copy on my server. I have also 
tried creating a .htaccess file on my server containing: "AddType 
application/vnd.google-earth.kml+xml .kml" but I had no luck.

Please find attached the full readout from my webconsole.

Thank you very much.

Original issue reported on code.google.com by j...@sonodrome.co.uk on 17 May 2013 at 5:39

Attachments:

GoogleCodeExporter commented 9 years ago
geoxml3 uses xmlHttpRequest to access the KML which has a same domain 
restriction on it.

working example accessing your KML through a proxy:
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=
http://www.geocodezip.com/xmlProxy060215.asp?https://maps.google.co.uk/maps/ms?m
sid%3D206524762946825961514.0004dce73037ec5216748%26msa%3D0%26output%3Dkml

Original comment by geocodezip on 17 May 2013 at 7:23