Custom Source Layers

in this lesson

Custom Sources are a way to bring in additional layers and overlays to CalTopo from outside sources. The ability to display additional geographic information in CalTopo is dependent on two initial factors:

  • The data must be hosted as a map server. This is what a map server page typically looks like.
  • The data must be in one of three formats: Tile, TMS, or WMS.

Custom Source Layers require a Pro or higher subscription.

Topics on this Page:

Pre-fill Layers

Let's start by taking a look at the edit box for adding a layer from a custom source.

add new layer menu showing custom source at the bottom

Custom Source is located at the bottom of the + Add Layer Menu.

To get familiar with this edit box, first go to the dropdown menu that says “Prefill with” at the bottom of the box.

intial edit box for custom map source

Edit Box for a Custom Map Source.

Prefill With dropdown menu is located in the lower-middle section of the box.

Use the Prefill With dropdown menu to access pre-loaded layers.

Here you can choose from a list of layers that we have prepared already. Select any of them to see how they load into the inputs for Type, Name, URL Template, Max Zoom, and Overlay.

Try out each prefill layer to see the formatting of the URL Templates.

list of currently available prefill custom layers

These are the custom layers currently available for prefill.

Custom sources often have limitations in the ways they can display. For example, they do not zoom very well and work best at only a few zoom levels. Some will only display as an overlay and not as a layer, or they will work better as a layer rather than an overlay.

You can rename any of these prefills if you want. Also, to access them easily in the future, you can save them to your account and they will always appear in the Your Layers section in the layers or overlays list.

Saving To and Editing From Custom Layers in Your Account

To save the layer to your account, click Save to Account at the bottom left of the edit box, as described in the custom layers introduction lesson. Editing is also covered there.

Back to Top

External Source Layer, Example 1: US Radar

If you are familiar with the necessary formatting now, you can move on to bringing in a fresh source. Here are two examples, including links to the data if you want to try it for yourself.

First, you need to find a link that either works as the direct URL template matching one of the formats listed, or you need to find a link that you can enter into the auto-configure box to have CalTopo create the correct link format for you.

you need a link to enter into the auto-configure box, labeled here with an arrow pointing to it

Enter the URL into the auto-configure box.

In the US, we have access to live radar services from the National Weather Service, as well as a number of graphical forecasts and other data, available at their web services page.

To find the appropriate pages, you can often search for your search term plus “web services” “map server,” or “REST services.”

From the above page, I chose the Base Reflectivity Radar link and got this page:

a Map server webpage example

Map Server page for NWS radar. Map server pages always follow this format.

This is a map server, so I can use the URL for the this page. This will work in this case, though it does not always work. Another option to try is to click the WMS link at the top of the page to get direct access to a text file.

display of a wms file text in xml language

This is the text of the WMS file. The URL for this file can be entered into the auto-configuration input field.

Either way, you’ll put the link into the auto-configure box and hit “GO.”

Add the link to the map server or WMS file into the auto-configure input slot.

What you want to have happen is a box to open looking something like this, where you can choose while layers from that link will be included in your display.

three layer options are listed with checkboxes next to them

The XML link provides three layer options to choose from for the new custom source layer, each containing different data. Not all types of data can be displayed in CalTopo.

four layer options are listed with checkboxes next to them

Entering the link from the Map Server page into the URL field gives 4 options. Through trial and error we can find out that the first and last options display the same data, the label option shows a boundary but no label, and the boundary will display colored outlines of the area that the image covers.

Choosing this method gives a potential error, which you can tap OK and see what happens.

error box warning that the process may not work correctly

After choosing layers from this I get an error message that says “Server does not appear to support a compatible projection. Will try anyway, but this probably will not work.

With either link (map server page or wms file), we get a new link that appears in the URL template box. You should add a title for your layer, then press SAVE to display the layer on your map.

in the custom source edit box, the field for URL template has an orange box around it to make it obvious

If it works, you should get a new layer, which will work just like other layers in CalTopo in that you can stack them, change the opacity, and more.

radar image with 52% opacity over a map background

Just as with other layers, you can stack custom source layers and adjust the opacity.

With this particular source for data, the layer updates every few minutes as new data is available.

Also, this particular data source can display in CalTopo well as either a layer or an overlay. Most of the time, data will really only work as one or the other. If your custom source isn’t displaying as you expected, consider editing it to be an overlay instead of a base layer.

menu showing the custom layers, and the layer name with a pencil icon and a red x for delete icon listed along with the layer name.

Use the pencil icon to open the edit box for the layer.

custom source edit box open with the dropdown menu for overlay choices open. choices are no-base layer, or yes-transparent overlay

Edit the layer as necessary, including switching from a base layer to an overlay, or vice versa.

While you are in the edit box, you could also change the name of the layer, and if you are happy with it and expect to use it again, Save it to your account with the blue link at the bottom-left of the box.

Once it saves, you will need to refresh the page to get it in your layers list. To edit it again (ie to change the name after you have saved it, add a new custom source, and use the “load from” feature, also in the lower left corner of the custom map source edit box, to select one of your saved layers to edit.

Accessing a Saved Layer

If you need to edit a layer after saving it to your account, you can do so via the same custom source edit box. Open a new custom source layer, then look for the dropdown menu labeled "Load From" in the bottom left corner.

Here you will find a list of all the layers that you have saved to your account. Choose one, then adjust the settings as necessary.

Note - when you save this newly adjusted layer to your account, it will save as a NEW COPY of that layer. It will not replace the orignal. If your intent was to replace the originally saved layer, you should go to the "Your Layers" section of your account info and remove the original layer there so that you only have the new one left.

Back to Top

Example 2: A slightly more complicated source

Now let us practice with a source that is not set up as cleanly as the US radar data.

Data source website in British Columbia, Canada.

Here is a website that provides access to public map data for the Province of British Columbia in Canada. Following the getCapabilities request link goes to the next page:

Data request page.

...which does not look like much. But we take the link listed as the URL here, and go back to CalTopo and pop it into the Auto-configure URL input.

Here we've pasted the URL into the Auto-Configure field.

Then press GO.

Next we get a long list of potential layers to pull into our new custom source layer. Depending on the map server, sometimes you will want all of the offerings, and sometimes only one. In this case, if we select all of them it’s very messy as these layers are not built to be tiled all into one. Let’s just pick one image - such as for Whistler.

Some map servers contain many layers - which sometimes fit all together, but in this case they do not, so we have only selected one layer. The only way to determine this is usually through trial and error.

Then I hit save and it goes back to the edit box.

After pressing the Auto-Configure GO button, the rest of the dialog box is filled.

The auto configure figured out that this was a WMS source and changed the Type field from Tile to WMS. It also created a URL template for me. I added a title called “Whistler Imagery.” Then select the save button to display the layer.

Now here is the imagery layer, and for compassion, the same location with the MapBuilder Topo layer.

The new custom layer is stacked over the original base layer, and opacity of the new layer is set to 100%.

So this image looks great when we are zoomed in quite a lot, but there is a problem as we zoom further out. Setting the custom source layer view at 100% opacity, and zooming out, we can see that this custom source is both geographically limited and the remaining background is all gray in places that the image does not cover. We could try going back and editing the layer to set it as a transparent overlay. However, in this case it remains the same. The gray background persists when set as an overlay, and furthermore we lose the ability to change the layer opacity. (If you are not familiar with layer opacity yet, check out the Using Base Layers lesson).

The image pulled from the source data is limited in its geographic extent. However, the areas where the image is not located are filled with gray, rather than being transparent. Changing the setting to make the layer an overlay does not fix the problem.

Here the custom source layer is displayed at 45% opacity.

One option is to view the layer at a lower opacity in order to see the context around it.

As you can see, custom sources can be fickle. Map servers are not necessarily serving up data that fits into CalTopo’s model of use. They require some digging, creativity, and trial-and-error.

Back To Top