Time for action – exploring OpenLayers options
As the OpenLayers map opens, you will see three icons inside the map. Clicking on the top-left one shows several options to interact with GeoServer WMS. We will now explore some of these options.
If you haven't already, select the OpenLayers output option for
topp:states
; or use the following URL to open the demo:http://localhost:8080/geoserver/topp/wms?service=WMS&version=1.1.0&request=GetMap&layers=topp:states&styles=&bbox=-124.73142200000001,24.955967,-66.969849,49.371735&width=780&height=330&srs=EPSG:4326&format=application/openlayers
Note
As you can see, the request itself is a
GetMap
request to the WMS service, so why are you getting a full app and not a plain image? Look at the parameters; there is aformat=application/openlayers
key-value pair. This makes GeoServer deliver you a full JavaScript app.Change the height to
512
and width to512
in the URL bar:http://localhost:8080/geoserver/topp/wms?service...