Using GeoServer With OpenLayers
  • Introduction
  • Publishing Data in GeoServer
    • Obtaining the Data
    • Creating a Data Store
    • Publishing a Layer
  • Rendering Data in OpenLayers
    • Adding a Base Map
    • Enabling CORS in GeoServer
    • Fetching Parks Data
    • Styling Features
    • Making It Interactive
  • Extending Your Application
Powered by GitBook
On this page
  • Adding Controls
  • Publishing Additional Layers
  • Creating Yet Another Application

Extending Your Application

PreviousMaking It Interactive

Last updated 6 years ago

Now that you've created a GIS application using both front and back-end technologies--publishing a data set and pulling it into an interactive map--you're ready to venture out on your own to continue learning.

Here are a few ways in which you might proceed.

Adding Controls

OpenLayers provides the , which can be used to add user controls. It has various subclasses that you can use out of the box, and can also be used to create controls with custom behavior. You might try to add:

  • The ZoomSlider control for controlling zoom level

  • A control that can be clicked on to zoom to the user's location (refer to the OpenLayers Workshop to )

  • A control to toggle a layer's visibility

Publishing Additional Layers

The city of St. Louis provides additional GIS data in the form of shapefiles, including , , , and more. There is a as well.

You might also look for additional open data resources. For example, after a few minutes of searching for geo data for other area parks, we found a .

When publishing new layers in GeoServer, be sure to pay attention to the SRS of the layer, along with styling (in particular, the zIndex).

Creating Yet Another Application

To bite off a bigger task, consider a completely different mapping application based on OpenLayers and GeoServer. Look for a usable open data set, and you can build your own app from scratch by publishing it in GeoServer, and starting with the OpenLayers template we used for our STL Parks app. You can follow the that we started with for this tutorial to get off and running!

Control class
see how to retrieve the user's location and use it
ward and neighborhood boundaries
historic districts
land use data
listing of all shapefile data
shapefile for St. Charles County Parks
same setup steps