vu-dang / geoxml3

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

"geoXML3 is not defined" #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When page is loaded, I receive "geoXML3 is not defined" message in my Firebug

I have a KML file which works on the server. But I'm trying to change my code 
the way I can read that KML file from local drive. 

I'm using Firefox v 31.0

and this is the whole code I have:
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <title>KML Layers</title>
    <style>
      html, body, #map-canvas {
        height: 100%;
        margin: 0px;
        padding: 0px
      }
    </style>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
    <script src="geoXMLV3.js"></script>
    <script>
function initialize() {
  var chicago = new google.maps.LatLng(41.875696,-87.624207);
  var mapOptions = {
    zoom: 11,
    center: chicago
  }

  var myMap = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
}
var myParser = new geoXML3.parser({map: myMap});
    myParser.parse('cta.kml');

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

    </script>
  </head>
  <body>
    <div id="map-canvas"></div>
  </body>
</html>
--------------------------------------------------
Errors I get:

SyntaxError: missing catch or finally after try

...y{topname=top.title;};catch(err){topwin=self;};if(topwin.publishdirectory){th
is

geoXMLV3.js (line 1, col 4419)
ReferenceError: geoXML3 is not defined

var myParser = new geoXML3.parser({map: myMap});

Original issue reported on code.google.com by mohammad...@gmail.com on 13 Sep 2014 at 4:53

GoogleCodeExporter commented 9 years ago

Original comment by geocodezip on 13 Sep 2014 at 9:57