Today we will be making maps that can be published on the internet (and actually publishing them!)
The process of publishing the map is actually quite straight forwards, 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 first lab: https://arc.gis.unbc.ca/portal/home/webmap/viewer.html?webmap=32eccccf584c4db8b7cfa7bfaee2e121
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.
Inside L:\GEOG205\lab08\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:
Rearrang the layers as follows
Because this will be a web map we want to change the projection to Web Mercator, this can be done by right-clicking on the map in the Drawing order, going into Coordinate Systems and searching for ‘web’.
Next, we will start working through this one layer at a time, turn off all layers except prov_territo. We will style this with Unique Values symbology.
Next we will add the 1:1 000 000 map grid (nts_snrc_1m).
Make the styling a hollow outline, and add labels using the ‘IDENTIF’ field, around 16pt in size, and add a halo for readability. For label, Placement use ‘Land Parcel’.
Next, we will add the 250k layer, we will do the same thing, making the layer a hollow polygon, and adding 16pt labels, this time using the NTS_SNRC field for text. You will need to zoom in for the labels to become visible. Set your zoom to the level where the labels are the width of the map sheets.
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://email@example.com,-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.
We will now see the Out Beyond property 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 course 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.
Next, go to the Appearance 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 linework to be turned off when we zoom out.
Finally, we have one more thing to change, and that is selecting the 1m layer, and setting its Labeling In Beyond value to the same value. This will cause the 1m labels to turn on when the 250k layer turns on. Note that we only adjusted the label, and not the appearance of the 1m layer so the blue outline remains.
We will stop here and make sure that everyone is caught up to this point.
Finally, we will add the 50k tiles, in same as before using a hollow symbol, and set the labels to 16pt with a halo, and zoom into the level 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.
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). Go to the Sharing 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.
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 reprojected 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.
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 reprojected.
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 arc map, this is largely due to the data being stored in an enterprise database as opposed to shapefiles.
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 right click 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 as 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.
For the next section of this lab, we will not need to use Osmotar (though you can if you want to). In your web browser visit this webpage https://arc.gis.unbc.ca/portal/home/index.html. This is web interface to the portal we have been using throughout the semester. Your credentials are the same <username>@UNI. And you will find the Sign in button in the upper right corner of the map.
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 arround with this if you wish, put 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 heatmap of ICBC claims in lab 5 but using a different technique for symbolization known as clustering.
We must first start by saving our new map, using the save as command to the right of the center in the top menu bar.
You will find that saving a map on the web asks for more information than in ArcGIS Pro, this is the same information you needed to add before sharing your map in part 1.
To save your map please 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.
- Details: This button is used to turn the left pane on and off
- Add: This will open the menus for adding data that has already been stored in the portal
- Basemap: Here you have access to the same set of base maps that were available in ArcGIS Pro
Go into Add and Search for Layers
Where it says “My Content” change this to “My Organization” to access all of the data available to UNBC Users.
You can search for “Crash” and you will be able to find a layer called LowerMainlandCrash, there is a + in a circle at the bottom of this card, pres it to add this dataset to your map.
Next, we will style the point layer, when you hover over the layer in the contents pane several options will show up below the name. These options include making the legend visible in the contents pane, showing the attribute table, symbology, filtering, clustering, and
We will start by setting the symbology using the change style option. You will find that the website will guide you along much more than ArcGIS Pro does, however, you also have fewer options at your disposal. For step one choose Crash_coun as the attribute to show
You will now notice that there are more options available under step 2, select drawing style. Choose Counts and Amounts (Color), and your map should appear as below.
If you wish to customize the colours you will notice that the select button has changed to options. Changing the colour ram is not the most intuitive, and we will be doing that now. Find the symbols button:
Once this is open, select “FILL” and you will be able to choose a colour ramp from the list
Press OK to close out of the symbology menus.
To clean up the map we will be using clustering
Here we can use the slider to decide if we want less points in each cluster making more clusters, or more points in each cluster making fewer clusters.
Click on the Configure Cluster Pop-up option
You will now find that the crash sites are grouped into nearby locations.
*At the time of writing the styling is based upon the average Crash Count field as summation is not yet a supported feature for clustering.
As you zoom in you will notice the clusters break appart.
To share your map Use the Sharing tool:
Next, we need to set some privacy settings, as we want to make a public link we will select Everyone, but there are also options to share with only users with a GIS account or to restrict it to predefined groups of users within the portal (an administrator needs to create the groups).
You are then presented with a link notice that we can share the extent or not, and it only changes the end of the URL. You can then take this link and share it with whoever might need to access the map you made. Pressing Done will make the link active. Feel free to post your link in the Teams chat to show others what colour and cluster size you chose.
Some other tools to note, we can generate a printable version of the map (this takes some trial and error to get the extent right, the printable version will have a similar extent to the current view but not exactly the same).
There are also Directions, this works much like Google Maps, however, if we had custom road networks (covered in GEOG 300) we could develop turn-by-turn directions over these custom networks.
And finally, a measuring tool, that anyone you share the map with will have access to. This is a great way to let end users confirm distances on maps you provide to them.
For this weeks assignment please make sure to read the entire assignment before begining, pay special attention to the details. When webmapping the metadata (data about the data) is essential to producing quality results. For the webmaps while you will still be marked on choosing colours that are easily visible, the creative posibilities will be more limited, however recording accurate information about your layers will be essential, and carry a heavy weight on your mark.
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 Telphone lines
- 200 year flood plane, and cadestrial lots
- Download your desired layers
- Share your layers to the UNBC ArcGIS Portal, your data must have the tags: Kamloops, 2021, and GEOG205.
- After your layers have been published to the folder, remove all the original layers from your map, and add the layers from the portal. They should be easy to find under ‘My Content’ the green person in front of the cloud.
4. Set the colour scheme you like, and zoom to the extent you would like users to see when they open your map.
5. Publish! Again your data must have the tags: Kamloops, 2021, and GEOG205.
6. Test the URL, and make sure the map works as expexted before submitting the url.
Part 2 (Map of Earthquakes in Peru)
Using the webpage https://arc.gis.unbc.ca/portal/home/ make a map showing the earthquakes in Peru.
There is an example here, but do feel free to use other options on Colours, and make sure to use good metadata, is has been purposfully removed from this example: https://arc.gis.unbc.ca/portal/home/webmap/viewer.html?webmap=49bb5b132cc849ea9745b760c6820eb0&extent=-90.4938,-19.455,-58.0402,-0.9654
Your map, should be symbolized on two attributes, first using año as Colour, and then magni_1 (magnitude with decimal places) as size.
Enable clustering (The clusters will be represented by average date and magnitude of the cluster). This is a limitation of of the online Map.
Finally we will add a label for magni (magnitude without decimals) or see below for how to preserve the decimal places, pres the … button, and you will have an option that reads either Manage Labels, or Create Labels (this is the same button but texts depends on if labels are currently visible or not.
This perhaps not the ideal way to label as it would be nice to label the clusters with the count of points contained, however clusters do not currently support labels, so this gives the viewer some indication if they are looking at an individual event or not.
If you would like to keep the decimal place in your magnitue, under field select custom and use the expression below: “Round($feature[“magni_1″], 1)”