0

I am trying to adapt the openlayers code on using cql on the US states layer [topp:states] (http://dev.openlayers.org/examples/cql-format.html). I am able to change the wfs layer from the http://demo.boundlessgeo.com/geoserver/ version to the local http://localhost:8080/geoserver/ but the localised code result in an empty map (without the wfs ... only base layer shows up) if I change the following code (found in cql html right before the end of the html body):

src="http://demo.boundlessgeo.com/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=topp:states&outputFormat=text/javascript&format_options=callback:loadFeatures" type="text/javascript"

TO:

src="http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=topp:states&outputFormat=text/javascript&format_options=callback:loadFeatures" type="text/javascript"

1 Answer 1

1

after asking the question continued research on the web and it turned out uncommenting the following in the geoserver web.xml

context-param

param-name

ENABLE_JSONP

param-name

param-value true param-value

context-param

as suggested by GeoServer 2.3 how to enable jsonp did the trick

Your Answer

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

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