Create a Guide to an Area Extensions
Outline
Instructions
Learn more about creating an interactive guide to an area with these extensions.
CHOOSE AN EXTENSION
Protect and Share Your Area Guide
Protect the data in your spreadsheet and share the spreadsheet with others.
Transcript
In this extension, you will protect the data in your spreadsheet and share the spreadsheet with others.
When you share a spreadsheet, you might want to protect the sheet or ranges in the sheet so people can't change the content.
This ensures that no one changes the functionality or details of your area guide.
To begin, open the protection settings.
Next, choose the part of the area guide you want to protect.
You can select a specific range of cells or an entire sheet.
Since you don't want your audience to delete or edit any content in your sheet, select the entire sheet.
Then, set the permissions for your protection.
You can choose to allow people to edit the spreadsheet after receiving a warning, Add specific people as editors, Or set the permissions so only you can edit the spreadsheet.
You should also protect the rating sheet to make sure the audience doesn't change your rating scale.
Now that your spreadsheet data is protected, find someone that may be interested in learning about your area and share your guide with them.
If you don't know who to share your guide with, ask your teacher.
Add a brief message to describe what your area guide is about.
Although you protected your area guide data, the people you shared it with can still sort and filter data to view the locations they are most interested in.
They can even click the link to view your map.
Now, it's your turn: Open the Protection settings, protect all the sheets in your spreadsheet, and share your area guide with someone.
Add Layers to Your Map
Add layers to your map to organize locations and customize the placemarkers for each layer.
Transcript
In this extension, you will add layers to your map to organize locations and customize the placemarkers for each layer.
Adding layers allows you to separate locations into groups.
For example, you might group locations by region of your area, like downtown or north Albuquerque.
Or you might group them by the categories you used in your spreadsheet.
Viewers can turn layers on and off to hide unwanted locations and focus on others.
To begin, open your map and rename the existing layer in your map.
Next, add a new layer and title it.
Repeat this process until you have all the layers that you would like to have in your map.
Keep in mind that you can have up to ten layers in Google My Maps.
Then, move the locations from the first layer to the layer that they belong in.
If you are unsure which layer a location belongs in, check the category that you marked it as earlier.
Click and drag each location to the correct layer.
If necessary, retitle the locations after you move them.
Next, create a uniform style for each layer.
Applying a uniform style means that all placemarks in a layer will look the same.
To customize the style of a layer, choose a location that belongs in the layer and edit the markers style.
All of the markers for the locations in the layer you just customized should now have the same color and icon.
Continue customizing your layers to make your map more organized and easier for your audience to understand.
Now, it's your turn: Add layers for each location category to your map and title them, drag each location to the correct layer, and create a uniform style for each layer.
Code an Alert Message
Write code to create an alert message to help your audience more easily use the sidebar.
Transcript
In this video, you will adjust your code to create an alert message to help your audience more easily use the sidebar.
As your code is currently written, it allows your audience to open the sidebar no matter what cell they have selected.
So if your audience selects a cell that does not have an embed image U-R-L, the sidebar may appear blank or just have text.
By coding an alert message to appear, you can ensure that your audience can correctly view the images for each location.
To begin, use the link next to the video to access the starter code.
Next, copy the code.
Then, open your code from your area guide spreadsheet.
Paste the starter code below the code you wrote earlier.
The code you just added is for a new function.
It checks the content of the active cell your audience selects before opening the sidebar.
This function includes a conditional if-else statement.
A "conditional statement" is an instruction that tells the computer to complete one function if a specific criteria is met and a different function if it is not.
The if section of the conditional statement tells the computer that if the contents of the selected cell start with the less than symbol followed by the word i-frame, that it should then carry out the show sidebar function.
The else section of the conditional statement tells the computer to create an alert message.
Save the code and run it.
You may need to give Apps Script permission to access the spreadsheet again.
Then, test the code in your spreadsheet by selecting a cell that doesn't contain an embed U-R-L.
Unfortunately, the alert message didn't appear and the sidebar opened, so return to the code to see what went wrong.
The code is still working as it did before because the see image menu is still directing the computer to open the sidebar rather than checking the cell's contents first.
Replace "show sidebar" with "check Input".
Then, save your code, run it, and test it in your spreadsheet.
Now your code works correctly and an alert message appears.
Finally, customize your alert message.
Add a short but descriptive message that tells your audience why they are getting an alert message and how to correct it.
Then, save your code, run it, and test it in your spreadsheet again.
Your code now produces a clear alert message to help your audience use the interactive image sidebar.
If at any point your code doesn't work correctly, ask a classmate or your teacher for help.
Now, it's your turn: Copy and paste the starter code at the end of your code, adjust the code to make the See image menu run the checkInput function, write a custom alert message, and save and test your code.
Except as otherwise noted, the contents on this site are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.