Skip to content

Uncaught SyntaxError: Unexpected token '<' api.js:1 in webGL #127

@danishkhan3621

Description

@danishkhan3621

I'm trying to intwegrate WebGL but when i run the same in browser i'm getting this error:

Uncaught SyntaxError: Unexpected token '<'
api.js:1

Uncaught ReferenceError: WE is not defined
    at initialize (index-new.html:7)
<!DOCTYPE HTML>
    <html>
      <head>
        <script src="http://www.webglearth.com/v2/api.js"></script>
        <script>
          function initialize() {
              var options = {
              sky: true,
              atmosphere: true,
              zooming: true
          };
            var earth = new WE.map('earth_div',options);
            WE.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{
             
            }).addTo(earth);
          }
        </script>
        <style>
          html, body{padding: 0; margin: 0;}
          #earth_div{top: 0; right: 0; bottom: 0; left: 0; position: absolute !important;}
        </style>
        <title>WebGL Earth API: Hello World</title>
      </head>
      <body onload="initialize()">
        <div id="earth_div"></div>
      </body>
    </html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions