Subscribe Bookmark



Jun 17, 2013

All About Background Maps in JMP 9: WMS Explorer Add-In

In my previous blog post, I talked about using a Web Map Service (WMS) to generate a background map. The WMS feature is more flexible than the static background maps provided as part of JMP. But it requires the user to find an appropriate WMS server and then determine specific information about the server, such as layer names.

This can be a time-consuming task in itself. Searching the Web will help you find WMS servers that are publicly available. But it can be more difficult to figure out what the layer names are and what the resultant map will look like. To help with this discovery process, I have taken advantage of another JMP 9 feature called the add-in. An add-in is a way to extend the functionality of JMP. Add-ins (including this one) can be downloaded from the add-ins page on the JMP File Exchange.

I created an add-in called the WMS Explorer. The WMS Explorer add-in is designed to make it easier for you to find a WMS server, query the server for layer names and show you what a map will look like. Here is what the WMS Explorer add-in looks like.

WMS Explorer add-in

At the top of the window is a text field where you can type in a URL to a WMS server. You can find possible WMS servers by searching the Web. After you enter a URL, either hit the enter key or click on the Get Layers button. This will send a query to the WMS server and return a list of layers that the server supports. If you do not know the URL for a server, you can select one from the drop-down list, directly below the text field. Selecting a URL from the list will populate the text field and submit the query for layer names.

The graph, below the drop-down list, will now contain a boundary map. Initially, the graph will show the Earth, with each country outlined. To the left of the graph is a list of layer names that the server supports. Select a layer name, and another request will be made to the server. This request will return a map that will be set as the background map on the graph. Here is an example where I selected the first URL in the drop-down list, the NASA server, and chose BMNG as the layer name.

Example using NASA server and BMNG as layer name

You can select the different layer names to see what each map will look like.

The graph is a typical graph in JMP, which means that all the regular JMP controls are available to you. You can adjust the axes or use the zoom tool (found on the hidden menu bar) just as you would in JMP. You can also right-mouse-button (RMB) to select Size/Scale->Size to Isometric to get your graph back into a proper aspect ratio. RMB will also allow you to select Background Map, where you can adjust the boundary map. Here is an example where I entered a URL for a WMS server in Spain and zoomed in on the Strait of Gibraltar. In this map, Spain is to the north and Morocco is to the south.

Example using WMS server in Spain, creating map zoomed in on Strait of Gibralter

Occasionally, a request to a WMS server will result in an error. At the bottom of the add-in window, there is an area for any error messages. You may try a server that no longer exists or is temporarily down. Or you may select a layer name that the server no longer supports. In a case like this, instead of returning a map, the server may return an error message that will be displayed in this area. Any error message that is displayed is a message that came directly from the WMS server.

Once you find a map that you want to use, simply note the URL in the text field and the name of the selected layer. This is the information you will need to use the WMS background map feature in JMP.

I hope you enjoy the WMS Explorer add-in and find it useful. If you find a good WMS server, please send it to me. I’ll try to keep an up-to-date list available to share with other JMP users. As always, feel free to share your comments and suggestions.

1 Comment
Community Member

All About Background Maps in JMP 9: NASA Server Lost in Space? - JMP Blog wrote:

[...] come and go as they please. You may have read another one of my blog posts in the series, titled All About Background Maps in JMP 9: WMS Explorer Add-In. That blog post describes a JMP add-in that I wrote called the WMS Explorer. The add-in helps you [...]