Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you install openLayers 3 locally?

I am new to OpenLayers and I have to develop an offline application that uses it. I have downloaded OL 3.7.0 and set it up with a test html file that loads the 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 are:

  1. Is "VERSION_NUMBER" only an openLayers 2 property? How do I verify the version of ol that I am running?
  2. Did I install ol3 properly or do I need to do something else? I can't seem to find anything that talks about how to install ol3
like image 792
GregH Avatar asked Dec 06 '25 07:12

GregH


1 Answers

1) Yes VERSION_NUMBER doesn't exist in ol3, the version number of ol3 you use is written on top of the ol.js file.

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

like image 196
oterral Avatar answered Dec 09 '25 15:12

oterral



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!