OpenLayers 3: "goog is not defined"

المشرف العام

Administrator
طاقم الإدارة
First time using OpenLayers. I am getting an error "goog is not defined". Here are the steps I performed:

  1. Downloaded and unzipped v3.0.0-gamma.4
  2. It created the following directory structure:
    • apidoc
    • build
    • closure-library
    • css
    • doc
    • examples
    • ol
    • resources
  3. I proceed to create a file called ol3.html and place it in the examples folder shown above. Here is the code of that file:

.map { height: 400px; width: 100%; } OpenLayers 3 example My Map


  1. When I load up the page, I get the error "goog is not defined". I can see that it finds the local ol.js file but it give the error "goog is not defined".
  2. If I switch this line:



    To this:


Then everything is fine and I can see the map. What am I missing?



أكثر...
 
أعلى