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.
1 Answer 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.
-
Thanks. This works. I was looking at the source tar ball, which didn't have the build subdir.tinlyx– tinlyx2014年11月25日 23:06:16 +00:00Commented Nov 25, 2014 at 23:06
npm
in it, but I am not familiar with using node.js. Thanks.