Is it necessary to learn openlayers to use geoserver? Can i completely ignore OpenLayers so long as i master using geoserver to publish data on my website because i understand openlayers is contained in geoserver? I would like to set up a web GIS but i find learning openlayers or leaflet difficult.

I would like to create a web application that receives data from, say a mobile phone and combines it with data served through GeoServer from my PostGIS database


3 Answers 3


It isn't necessary to learn OpenLayers or Leaflet when you just want to use GeoServer.

However, I have a single advice for you: because you already have a working GeoServer, do yourself a favor and go to https://github.com/boundlessgeo/suite/tree/master/geoexplorer. Follow those instructions, build a geoexplorer.war and deploy it to your servlet container.

GeoExplorer is tightly integrated with GeoServer, and is ideal for someone without an OpenLayer or Leaflet background.

Using GeoExplorer your maps will have a professional look, as a real web application.

As a map creator you'll log into GeoExplorer using the same user and password you have in GeoServer:

enter image description here

Then, choosing your desired layers, zooming and panning to your location, you only need to export the map, ticking the tools you want to be available to your users:

enter image description here

Here's a preview of your future web application (the 3D look of the buildings is due to a SLD style in my GeoServer):

enter image description here

Your users will be able to:

  • measure length or area

enter image description here

  • read features' data

enter image description here

  • do a map print preview

enter image description here

  • modify / create features / modify values (even from their mobile devices, as you said, but only if you give them rights)

enter image description here

  • perform strong queries (if you give them rights)

enter image description here

Isn't this a great web application? And everything without writing a single code line!


OpenLayers And GeoServer are two distinct softwares, used for different purposes.

Geoserver is a Server Software, which serves out Geospatial Data, via OGC services.

OpenLayers is JavaScript Library which can be used to make web applications that (Amongst other things) can consume OGC services.

It just so happens, that when Geoserver wants to use something to display a preview, it uses a limited version of OpenLayers. Beyond this, they are totally independent.

You can use many clients with Geoserver like Leaflet, Qgis, ArcGIS Desktop & ArcGIS Web API's and many others.

Similarly, for OpenLayers, Geoserver is just one of the many possible sources of data. OpenLayers can use data from MapServer, GeoJSON files, GPX files, ArcGIS Server, and so on.

Now the answer to your question is, it depends.

If you just need to publish Geospatial data, and serve it via OGC services (like WMS, WFS & WCS) you can just figure out GeoServer, and forget about OpenLayers.

If on the other hand, you need to develope a web application that uses data from GeoServer, you'll need to learn a web mapping library like Leaflet, OpenLayer or many others.

  • Thanx Devdatta, I would like to create a web application that receives data from, say a mobile phone and combines it with data served through GeoServer from my PostGIS database.
    – joemaina
    Jan 31, 2014 at 10:03
  • For this, you'll require to learn not just OpenLayers, but also some Server side technology, like Java or Php. Jan 31, 2014 at 10:15

Rather than completely forget about OpenLayers (or LeafLet or some other clients) I tend to think that knowledge in how spatial data services (like WFS, WMS, WCS) are consumed is invaluable for my back-end responsibility (managing Geoserver).

The way I see this is like OpenLayers is front-end and GeoServer is the back-end component of a (geospatial) app stack. So it'll be great if you sit in one end but also know the other end.

In my experience, the requirement with regards to maps -eg. style, whether or not there's need for showing only some feature of a layer- often dictates how spatial data is served in GeoServer.

Here's some example:

  • Layer can be set to show only in certain zoom range. This can be done in 2 ways: (1) by <MinScaleDenominator> and <MaxScaleDenominator> (2) using minScale and maxScale in OpenLayers.
  • Layer can also be shown with transparency. This can be set either in GeoServer as style or in OpenLayers side.
  • The application requires that piecharts and feature labels should be able to be turned on/off independently. For this we need to provide layer that only shows piechart and another layer that only shows feature labels (these are achieved with style).
  • The app demands for showing a certain features (not all) out of a layer based on a certain attribute field. This is where SQL Layers needed.
  • Your GeoServer layers are used by a number of different applications with different requirement and character. You may choose to provide: (1) all layers in one GeoServer Workspace, or (2) manage those layers in different Workspace reflecting an app or a group of apps.
  • An app needs a WFS or even WFS-T service on a few of your GeoServer layer. Considering that enabling WFS in a GeoServer with lots of layer might expose the rest of the layer with the possibilities of being downloaded as SHP, you might need to set a dedicated instance of GeoServer for serving WFS to the app. This however might be considered an overkill by some.

Our effort in satisfying those requirements will be greatly helped by some knowledge of OpenLayers.

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.