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"

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
roger
  • 57
  • 5

1 Answers1

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

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
roger
  • 57
  • 5