Introduction

Today we will be making maps that can be published on the internet.

The process of publishing the map is actually quite straight forward, however, the cartographic principles we use do change somewhat. Up to this point, we have had a great deal of control over how our maps are viewed: we have been able to pick the paper size, we have been able to set the scale, and have been able to adjust the position of the elements carefully to avoid overlap. However, as we enter the world of web mapping we no longer get to know what screen size the user will have, the user gets to choose the zoom level, and position. It then becomes our job as cartographers to use the tools we have to make the display as robust as possible to clearly communicate with users regardless of how they view our web map.

For today’s lab, we will be recreating the NTS web map that we looked at all the way back in the second lab:

https://arc.gis.unbc.ca/portal/apps/mapviewer/index.html?webmap=bc5abed9cd044294882703e918c6419a#

As well as looking at another approach to mapping the ICBC Crash data.

Our first web map

Start by creating a new project in ArcGIS Pro for your ‘NTS Map’ inside of your GEOG205 folder. The process for making a web map starts out exactly the same as a paper map. Where we will see differences is in the styling as we will not have exact control of what zoom or extent the end user will see; this will require making design choices that will be robust to different positions. This may mean making some compromises on the overall styling to ensure a consistent user experience.

Inside L:\GEOG205\lab07\nts_snrc you will find layers nts_snrc_50k, nts_snrc_250k, nts_snrc_1m, and prov_territo. Add all 4 layers to your map. You should have something as below:

Rearrange the layers as follows

Because this will be a web map, we want to change the projection to Web Mercator (EPSG 3857), this can be done by right-clicking on the ‘Map’ in the Drawing order, going into Properties, then Coordinate Systems and searching for ‘web’ or ‘3857’.

If you were publishing a 3D scene you would want unprojected data EPSG 4326.

Next, we will start working through this one layer at a time, turn off all layers except prov_territo. We will style this with the Unique Values symbology. Click ‘add all values’ in the Symbology pane if they don’t turn up in the list on their own.

When we start adding the map tile layers, we will style and add labels. This will start to look cluttered, but at this stage trust the process as we will be returning to change how the layers interact with each other after they are all added.

Add the 1:1 000 000 map grid (nts_snrc_1m).

  • Make the styling a hollow outline, the colour can be whatever you wish
  • Add labels using the ‘IDENTIF’ field
    • Text should be 16pt with a halo
    • Placement should be set to ‘Land Parcel’

At this stage you should have a functional index of the 1:1M map sheets.

Next, we will add the 250k layer; use a similar pattern for styling, this time using the NTS_SNRC field for label text.

You may wish to use a different colour for clarity; as well as making the lines thinner to denote that it is, in comparison, a minor division.

Scale and Web maps

Map scale works differently on the web. Generally speaking, we refer to zoom levels as opposed to scale when making web maps; in part, because we do not know how big the end-users screen will be compared to its resolution. Practically, this means that we will see some strange scales that are not round numbers. Fear not–this will not impact your grade, as it is merely the software going to its natural zoom levels. 

You can see this when looking at a google maps URL such as https://www.google.com/maps/@53.989288,-122.6068734,10.9z. The end of this URL has a z-value: this is the zoom. Historically, the z value was always a whole number between 1 (entire earth) to 20 (maximum zoom), however these days due to the variety of screen resolutions and a desire for intermediate zoom levels, the z is generally a decimal number.

Back to our ArcGIS projects, as the multiple scales are now cluttering the map, the next step will be to leverage scale-based visibility to turn the layers on and off.

The goal at this stage is that as the map is zoomed in, the line work for more coarse layers should remain, however the labels should be hidden when the next layer appears.

Start by zooming such that the labels for the 250k map sheets fill most of the tile, we want the labels to be clearly visible, but still contained within their boundaries.

We will now set the Label In Beyond (Minimum Scale) property of the 1:1M layer to <current>. What this means is the labels will be turned off if the scale is more coarse than the current view. Think of this setting as “The layer will be IN view only BEYOND (more coarse than) scale X.” Find a zoom level that seems logical, note that due to different screen resolutions, you may have a slightly different zoom level that ArcGIS Pro naturally goes to while zooming, this is OK. What will matter however is that you are using the same scales to turn off one layer, and turn another one on to avoid glitches where they are both present or both missing if this is not the desired effect.

Now, select nts_snrc_250k, go to the Feature Layer Tab, and set the Out Beyond here to the same value (You will see it in your history directly below <None>. This will cause the line-work to be turned off when we zoom out.

Turning this:

into this:

We will stop here and make sure that everyone is caught up to this point.

Finally, we will add the 50k tiles, in a similar style as before using a hollow symbol, and set the labels to the NTS_SNRC field, with 16pt font with a halo, finally set the and zoom to fit the labels fit comfortably inside.

Set the 50k layer for both appearance and label to Out Beyond this current Zoom. And the 250k labels to In Beyond the current Zoom

One more thing we can do to make the map more usable is to set the prov_territo layer to In Beyond the same scale we used to activate the 250k layer, this will allow us to see the map below the polygons.

Zoom in or out to the extent you would like to be the starting point of your web map.

Publishing our map

Publishing the map is very easy once the layers are set up with the correct styling. This is also a good time to rename your layers in drawing order before uploading; this will be easier to change now than after publishing.

Sign in to UNBC ArcGIS Portal if needed, then go to the Share tab, and press Web Map.

Before the map can be published, we need to specify a few details, including: the name of the map, a brief summary, and a comma separated list of tags (keywords we can use to find the map later.) And we want to set sharing to Everyone.

For Location / Portal folder you should see your folder available. Choose that folder.

Once you have these settings, press the analyze button.

You will likely see a couple of warnings here:

The first one saying that the Data Source is not registered, and will be copied to the server. And the second one saying the projection is different (all web maps will be Mercator, but the NTS shape files are Canada Albers) they will be re-projected on the server, but it will take some extra time to process).

If any errors are present (red X) they will need to be addressed before publishing. It is possible you will see Unique numeric IDs are not assigned. If so, double click on the message and it will open a window allowing you to enable the unique ID’s.

Finally Press Share

And wait, this is not a very fast process, as all of the layers need to be uploaded to the server and re-projected.

When it is finished you will get a success message, click on the Manage the Web Map button.

This will open a web page with information about your map. The URL in the web browser could be shared with others allowing them to view your map.

To see the map, press “Open in Map Viewer”

You have now published your first web map!

You will also notice that it loads faster than in ArcGIS Pro, this is largely due to the data being stored in an enterprise database as opposed to shapefiles.

Publishing Layers

You also have the option of publishing layers. This will make the layers available in the portal, to be used on a variety of maps. This has the advantage that if the layer is updated, all maps that rely on this will also be updated (when might this be a bad thing?).

By default, any layers you add from the portal are added to the map by ‘reference’: that is, the data will not be uploaded again when you share your map. Layers added from the filesystem will be uploaded with the map (it is possible to reference these later, however they will contain less metadata).

To do this, go back to ArcGIS Pro and right click on the layer you want to upload, choose sharing and Share As Web Layer.

*Note if you want to edit an existing web layer, you could open it, edit in ArcGIS Pro, and then Overwrite Web Layer if you have editing permission on the layer. But a word of caution, this will overwrite the original data and it would likely be wise to save a backup before overwriting.

Otherwise it is the same process of setting a Name, Summary, Tags, and Location (again your folder is fine).

Click Analyze to check for errors, if no errors are present press Publish.

Clustering Data

In your web browser, visit this webpage https://unbc.maps.arcgis.com. This is the web interface to the portal we have been using throughout the semester.

Once you are logged in you will be presented with the welcome page and a selection of icons across the top.

Home – This is the default page, there is little reason to be here.

Gallery – This is where you can view all the public data / maps from the UNBC GIS Lab in the portal: a good place to go exploring.

Map – This is where we will be working today to build our second web map.

Scene – Just as Scene represented 3D in ArcGIS Pro so it does here as well, you can play around with this if you wish, but it does have known issues crashing some web browsers.

Content – This is where you can find and manage all the content that you have published (Your map from part 1 will be in here).

Organization – This is for website administration, and there will not be anything you can edit here.

Let’s go into the map tab and start exploring

In general you will find this to be a simplified version of ArcGIS Pro. We will be creating a map similar to the heat map of ICBC claims in lab 5 but using a different technique for symbolization known as clustering.

Start by naming your map using the Save command near center in the menu bar on the left side of the page.

You will find that saving a map on the web asks for more information than in ArcGIS Pro.

To save your map please set the category to GEOG205, and add Tags for ICBC, WebMap and Homework. The save in folder will default to your username, as you have not yet created any subfolders, and this default location is perfectly ok for our purposes today.

Click Save map.

Now add the ICBC Claim layer

You will need to change the drop down from My Content to My Organization. You can search for “lower” and you will be able to find a layer called LowerMainlandCrash, there is a + in a circle at the bottom of this card, press it to add this dataset to your map.

Now we will apply a technique for simplifying the map called clustering, looking along the right hand side of the interface there are various controls for working with layers, find the Aggregation button and then select clustering from the menu.

You also have the option of changing the symbol attributes by using the Styles Menu

Next go into clustering options and fin Cluster fields, add a field from CrashCount that computes the Sum

next go back and set the cluster label to the new field you just created

Also in this section is options to change the appearance of the clusters

  1. You can pick your symbol template, this is where you set the colour and shape of the icon used.
  2. Cluster radius says how far to search to add points to a group, a larger cluster radius will result in less clusters with more points.
  3. Size range allows you to set how big the symbol for the smallest cluster (an individual point) as well as the largest cluster should appear on the map.

Cluster Radius and size work together to produce a readable map, if you use a small radius with large maximum size you will end up with messy overlap in your data:

Likewise a large radius, with small maximum size will be very sparse and hard to read

You will want to find a balance that the markers do not overlap, but are large enough to make looking at the size an intuitive representation of crash counts

Lastly before settling on settings to us, make sure it works on the entire zoom range between having all of your data on the screen, and zoomed in enough that all clusters break apart to a single point. This is as so many things with cartography a case of a simple task, but does require attention to detail and experimentation.

Next we will look at an option that is perhaps not the most ideal for the ICBC data due to the massive range in points, but you will need to know for the assignment.

First open the styles menu from the sidebar

Notice there is currently only one style option, to get more options choose “+ Field” and select crash count.

You will see that there is now more options!

Pick Color and Size.

A few things will immediately happen your clusters will have all gotten tiny as their size is now controlled from styles, they are coloured with a gradient, and finally if you zoom in you will notice that the smallest clusters have lost their labels. The labels is caused by once we zoom in enough and the clusters break to be a single point, cluster and its associated labels are no longer driving the style.

First lets fix the size issue, click on style options and change the minimum size to something easily visible somewhere between 30 and 40pt would be good.

To get your labels back you will find labelling on the right tool bar and can enable it for the individual points. Give this one a try on your own and if you get stuck your TA will demo it.

Once you have a map you like you can enable Sharing along the Left Hand side

When you share the URL to the map, the guest users will be presented with the extent you had when you last clicked save. A very helpful feature for this is that when layers are added to a web map, if that layer is updated inside of ArcGIS Enterprise, the map you created will be updated to reflect this. However this also comes with a note of caution that the map you created may not continue to work if dependent layers are removed.

Assignment 7

For this week, please make sure to read the entire assignment before beginning. Pay special attention to the details. When web-mapping, the metadata (data about the data) is essential to producing quality results. For the web-maps, while you will still be marked on choosing colours that are easily visible, the creative possibilities will be more limited. Recording accurate information about your layers, however, will be essential, and carry a heavy weight on your mark.

Submit the URLs to the maps you create in Moodle.

Part 1 (Map of Kamloops)

For part one, you will be downloading data from the city of Kamloops (at least 2 layers). Some potential ideas would be (though don’t feel limited to these, if you have another map you would like to make)

  • Parks and Trails
  • Water Network, Sewage System, and Telephone lines
  • 200 year flood plane, and cadestral lots

https://mydata-kamloops.opendata.arcgis.com/

  1. Download your desired layers
  2. From ArcGIS Pro, share your layers to the UNBC ArcGIS Portal, your data must have the a proper title, the tags: Kamloops, 2024, and GEOG205; as well as a summary of what the data is. change the Data and Layer Type to “Feature” to keep the symbology editable.

3. After your layers have been published, you will be able to see them in ArcGIS Pro in the Portal Tab of Arc Catalog. You will want to remove from your project the layers you downloaded, and re-add to your project layers from the Portal. This will avoid needing to re-upload the data when you publish your map.

4. Set the symbology and zoom to the extent you would like users to see when they open your map.

5. Publish your web map. Again your data must have the tags: Kamloops, 2024, and GEOG205; fill out as much of the metadata as you can.

6. Test the URL, and make sure the map works as expected before submitting the URL.

Part 2 (Map of Earthquakes in Peru)

Using the webpage https://unbc.maps.arcgis.com make a map showing the earthquakes in Peru.

The map should have the tags Peru, 2024, and GEOG205.

Add the layer eventos_sismicos from the portal.

Your map should be symbolized on two attributes (Choose attributes, + Field for “año” and “magni_1”). Select drawing style “colour and size”, first using “año” as colour, and then magni_1 (magnitude with decimal places) as size.

Next you will want to turn on clustering to not overwhelm the map.

Add labels for magnitude to the individual events.

Save, then enable Sharing of your map.

After you have tested the URL, include it in the moodle submission. Remember your TA will only be able to view your map if you have shared with University of Northern British Columbia.

For those pursuing the A+ on this assignment

Add labels for the clusters as well, as a count of events. Use a different font colour on Clusters and Individual events to indicate to the user of the map if they are looking at a cluster and thus label is a count or seeing the actual magnitude of the earthquake.

Round the magnitude values, under label field, select </> and use the expression below: “Round($feature[“magni_1″], 0)”. The “0” before the closing parenthesis is the number of decimals to keep.

Save, then enable Sharing of your map.

After you have tested the URL, include it in the moodle submission. Remember your TA will only be able to view your map if you have shared with University of Northern British Columbia.

Categories: GEOG 205Labs