From the course: JavaScript for Web Designers

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Solution: Modify the map

Solution: Modify the map - JavaScript Tutorial

From the course: JavaScript for Web Designers

Start my 1-month free trial

Solution: Modify the map

(upbeat music) - [Instructor] Let's explore one possible solution to this challenge. Scrolling down to the map, I can see here's the Hollywood location and the one that I'm calling the Chavez Ravine location. I lived in Los Angeles, so I know that that's what that area is called. It pops up with that info box. It's working like we expect it to. So, how did we put this together? First of all I needed to geocode that address, using the same service that we used before, feeding in that address here and pulling out the coordinates. Back over here in my script, I now have three locations up here at the top. I have the store location for the Hollywood location which I've renamed to avoid confusion here. The one at Chavez Ravine, where I've plugged in those coordinates. And then the new center point which is not either of those locations because I needed a place that could show both of them. We've changed around the zoom…

Contents