I have installed GeoServer 2.5 and by default it had OpenLayers 2.8, now I have replaced the OpenLayers folder with OpenLayers 3 (ol3) contents and it is not working.

The examples in the ol3 folder are not working.

So please suggest me how should I use OpenLayers 3?

Which folders have to be changed?


OpenLayers 3 is not just an updated version of OpenLayers 2. It is a total rewrite and uses a totally different set of values (e.g. the OpenLayers object is called ol). If you want to use it with GeoServer, you have to rewrite your JavaScript code to work with OpenLayers 3. You can find examples and API reference on the official page.

The main discomfort in using GeoServer with OpenLayers 3, is you have to rewrite your map codes from scratch, GeoServer won't generate it automatically (maybe in the next version). You can't evade this by replacing the OpenLayers 2 content with the OL3 one.

  • hi Gabor, you are right I will follow your suggesstion. TY. – Tara Oct 20 '14 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.