Video summary
WEBD164 | Google Maps for Photography Portfolio
Main summary
Key takeaways
Summary
The video demonstrates how to add an interactive Google Map beneath photos on a photography portfolio, allowing visitors to see where images were taken. The presenter follows Google’s documentation tutorial, “Add a Google Map with a Marker Using JavaScript.”
Implementation Guide
-
Set up the Google Maps API
- Create an API key and add the Maps JavaScript API loader to the page.
- The initial loader snippet may not fetch all map code immediately; Google loads additional resources when the API is used.
-
Add and style a map container
- Place a
<div>where the map should appear. - Give it a defined height and width—for example, a height of 400 pixels and full width—then adjust the spacing and layout to fit the page.
- Place a
-
Create the map and marker
- Use an asynchronous
initMapfunction andawaitto load the Maps and marker libraries. - Initialize the map with a center location and zoom level, then add an
AdvancedMarkerElementwith a position and title. - The example starts with a default location, which is then changed to the photo location.
- Use an asynchronous
-
Find and tune a location
- Google Maps uses latitude and longitude coordinates. A place-name lookup site such as latlong.net can provide coordinates. Alternatively, right-click a location in Google Maps to copy its coordinates.
- Adjust the zoom setting to control how much of the surrounding area is visible.
- Coordinate precision affects how accurately the pin marks a location. The presenter notes that five decimal places are generally sufficient for a portfolio map.
-
Add more markers
- Create additional markers by repeating the marker code with different coordinates and titles.
- For larger sets of locations, store coordinate pairs in an array and loop through them.
The resulting map can show the locations of individual photos or groups of images. The presenter also notes that maps can be combined with other photo details and interactive page elements.
Main Speakers and Sources
- Max Morgan — Presenter and narrator.
- Google Maps JavaScript API documentation — Setup instructions and the marker tutorial used in the walkthrough.
- latlong.net — Suggested tool for finding coordinates.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.