Integrating WMS

What is WMS?

WMS, or Web Map Service, is a standard protocol for serving geospatial images from a central WMS server.  These images, commonly referred to as map tiles, can then be overlaid on top of a map to add new dimensions of data.

A WMS server can have many different layers that represent these independent sets of data.  These layers can be selectively chosen and then combined by the WMS server to form a single, composite view of the data that is relevant to you and your customers.  You can think of these layers as separate panes of glass that have different map features drawn on them which can then be stacked on top of each other to compare and contrast different dimensions of data.

WMS in GMaps Plugin

To use WMS in GMaps Plugin you must have access to a WMS server via a URL.  If you are trying to access your own WMS server your IT personal should be able to provide this to you.  Keep in mind that your companies firewall policies apply to any public WMS servers you try to access.  The URL will typically look something like this:

Example: http://webservices.nationalatlas.gov/wms/people

Testing your WMS URL in a Web Browser

You can check to see if the URL is valid and connects to an available WMS server by pasting the URL into your browser followed by the string

Example: ?REQUEST=GetCapabilities&SERVICE=WMS

For example, to test the URL above you would enter the following in your browser’s address bar:

Example: http:// 184.106.160.192:8080/geoserver/wms?REQUEST=GetCapabilities&SERVICE=WMS

This should trigger the download of an xml file that specifies various properties of the WMS server you are connecting to.  It is not necessary for you to actually read, understand, or even download this file.  If you are unable to connect or get an error when navigating to this location you may have an invalid URL or are unable to connect to the WMS server from your current location.

Connecting WMS in GMaps Plugin Appearance Tab

1. In the GMaps Plugin property sheet go to the “Appearance” tab and select the “WMS Server” option and enter in your WMS URL as shown below:

NOTE: For GMaps Plugin to work correctly DO NOT INCLUDE the question mark and any text following it when entering the WMS URL into the GMaps Plugin property sheet.

2. After entering your URL click the “Get Layers” button.  This will query the WMS server for a list of available layers and display them back to you under the Map Tile Layers section.  Each layer is specified by a human readable name and, optionally, a legend icon that represents the color scheme of that layer, as shown in fig 2.

3. Selecting the checkbox next to each layer tells the WMS server to include that layer in the composite map tile that is served back to you and overlaid onto your map.

An example map already overlaid with three separate layers is shown in fig 3.

Important Notes for Using WMS with GMaps Plugin

1. Typical file sizes for a single map tile range from 4-60 KB, depending on the information density of your graph.  A typical map will have anywhere from 16-60 map tiles loaded at one time, depending on the size of your map and the resolution of your customer’s monitor.  The network speed of your customers and the WMS server will affect the responsiveness of your map.

2.  The set of map tiles is refreshed every time you (the customer) changes the zoom level on the map or pans to a new area of the map.  Constantly changing zoom levels and/or panning rapidly will produce a noticeable lag on the map tiles service, as the WMS server must work to catch up to the customer’s current map view.

3. A WMS server might not have information for a specific geographic area at certain zoom levels, so it may appear at first not to be working when in fact you (the customer) may have just not requested any map tiles that have features drawn on them.

4.  Additional information on the WMS specification for the technically minded is available at:
http://www.opengeospatial.org/standards/wms

Tools for Debugging and Testing

A useful tool for viewing different WMS server information for Firefox is available at:

https://github.com/amercader/WMS-Inspector/wiki/