How do I install OpenLayers 3 locally?

I am new to OpenLayers and I need to develop a standalone application that uses it. I downloaded OL 3.7.0 and configured it with a test html file loading OL javascript file via:

<script src="./build/ol.js"></script>

      

The next thing I do is get the version via:

document.write(ol.VERSION_NUMBER);

      

My questions:

  • Is "VERSION_NUMBER" only openLayers property 2? How do I check the ol version I am running?
  • Have I installed ol3 correctly or do I need to do something else? I can't find anything that says how to install ol3
+3


source to share


1 answer


1) Yes VERSION_NUMBER does not exist in ol3, the version number of ol3 you are using is written on top of the file ol.js

.



2) ol3 is pure javascript, so if you load the compiled file (ol.js) into your HTML page, you don't need to use it anymore. If you want to compile yourself in the library, have a look at the github page

+1


source







All Articles