Working with Web Map Service (WMS)

Another way to change the appearance of maps is to connect to a service called Web Map Service, which serves map tiles, and use those instead of the default maps the come with Tableau.

In this recipe, we are going to plot some areas based on zip code and provide a map background based on a web map service:

Working with Web Map Service (WMS)

Getting ready

To follow this recipe, open B05527_05 – STARTER.twbx. Use the worksheet called WMS, and connect to the DOHMH New York City Restaurant data source:

Getting ready

How to do it...

Here are the steps to create a map with a WMS background:

  1. From Dimensions in the side bar, drag DBA to the Filters shelf and filter the values to only show MCDONALD'S.
  2. In the Dimensions section, double-click on Zipcode. This will show the Tableau default map in the view.
  3. From Dimensions, drag DBA to Details in the Marks card. This will update the map with circles representing locations of the McDonald's restaurants.
  4. Click on the Map menu, and select Map Services…:
    How to do it...
  5. In the Map Services window that appears, select Add and then WMS Servers…:
    How to do it...
  6. In the Add WMS Server Connection window, type the following in the URL field: http://ows.terrestris.de/osm-gray/service?:
    How to do it...
  7. Close the Map Services window when done.
  8. From Measures, drag Cuisine Average Grade to Color.

How it works...

Instead of the built-in Tableau map, we may want (or need) to use a map with a different feature, or different look and feel, with our geolocation data. One way to do this is by connecting to a Web Map Service (WMS) in Tableau. A web map service is defined in Open Geospatial Consortium (http://www.opengeospatial.org/standards/wms) as a service that does the following:

"Provides a simple HTTP interface for requesting geo-registered map images from one or more distributed geospatial databases"

Some WMS servers can be publicly accessed, while others are private and/or commercial. To use a WMS server, we can simply add the URL to Tableau. This option can be found under the Map Menu, and Map Services…:

How it works...

Once the URL is registered and Tableau verifies it can connect, the map tiles can be used. What we used in this recipe is a publicly available web mapping service from http://ows.terrestris.de/dienste.html#openstreetmap-wms.

There's more...

Ever wondered why Tableau can render the map very easily? Tableau actually uses its own Tableau Map Service (TMS), which is available from the Tableau Map Server. What if you want to connect to a mapping service that does not support the WMS protocol? You can use TMS to connect. This will require creating a TMS file, and supplying the required information, such as server, format, and request string. The full documentation is available from the following link:

http://bit.ly/tableau-map-service

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.35.185