简体   繁体   中英

Show/hide div when clicked on marker

I'm new to javascript and no idea where to start digging information how to implement my idea. I want to open a div like a pop-up over the map when a marker is clicked. I have around 15 markers and every marker has different content and images. The pop-up layout will stay the same. I believe making a div is easier than making a infobox, true?

this is my photoshop sketch: Sketch

And this is what I have so far: Demo

What should I try, read and investigate?

You could just use the info window of google maps see https://developers.google.com/maps/documentation/javascript/reference#InfoWindow and customize it's contents. like in this question: Google Maps API v3: Custom styles for infowindow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM