0

I was wondering what are the necessary files for hosting a webgis server with OpenLayers3 without using a CDN?

I am testing on a localhost without internet access. It doesn't work to merely copy the direct js (and css) file pointed to by a CDN such as

http://openlayers.org/en/v3.0.0/build/ol.js

to the local webserver as <script src="js/ol.js"></script>.

Also, the same question holds for jquery and bootstrap. I had

<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

But I wasn't sure how to get a complete local version for those.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Nov 25, 2014 at 7:03
2
  • You can run your own server using nodejs locally, if you first pull all the source files from github. You will not need an internet connection for this. If you are interested in this approach, I will write it up. Commented Nov 25, 2014 at 19:45
  • @JohnBarça Yes, I am interested in that approach. I've asked a new question about it gis.stackexchange.com/questions/123449/…, in case there are more traditional ways that should be considered right. I did notice openlayers has something named npm in it, but I am not familiar with using node.js. Thanks. Commented Nov 25, 2014 at 21:40

1 Answer 1

1

Download the v3.0.0 distribution from https://github.com/openlayers/ol3/releases , then copy the js file(s) inside the build/ subdirectory to your webserver.

answered Nov 25, 2014 at 8:10
1
  • Thanks. This works. I was looking at the source tar ball, which didn't have the build subdir. Commented Nov 25, 2014 at 23:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.