I have been searching for solutions to call GeoServer REST api from OpenLayers 3 for a long time.

I found that for OpenLayers 2, there is a OpenLayers class OpenLayers.Request for doing this: http://docs.openlayers.org/library/request.html

But for OpenLayers 3, I can't find a similar class. I tried a lot of online code for PHP proxying (andjsonp) trying to do the same without OpenLayers.Request, to no avail.

What is the correct/most reliable way to call GeoServer Rest from OpenLayers3 (or even general JavaScript with jQuery/AJAX)?


Internally OL3 uses Google Closure XhrIo to load data in vector layers.

OL3 philosophy has changed, now is a more concrete library, mainly oriented for gis mapping, instead a general purpose library like OL2.

OL3 leave to the user tasks like AJAX request. You can make them using XMLHttpRequest or through any other library like jQuery or Google Closure.

| improve this answer | |

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.