NaSSeR AlQahtani NaSSeR AlQahtani - 2 months ago 8
HTML Question

HTML google map marker "popup page"

Hi and Good Morning/Evening.

I've some problem regarding googlemap API. I want to know how to make googlemap marker cklickable and if someone click on it it'll open a popup page like in this example : https://m.sce.com/outage/OutageMap_new.html

I tried to understand the source code but I didn't.

Thank you in advance =)

Answer

Ok so at this link Should help you out. This is all the documentation about marker event listeners. https://developers.google.com/maps/documentation/javascript/events.

If you scroll down to Handling Events they show show how to handle events on the markers.

I'm guessing that you obviously know some stuff about Javascript so I wont go into detail. But what you can do is to show a custom popup window

https://jqueryui.com/dialog/

http://demos.jquerymobile.com/1.4.5/popup/

(Links for reference)

When the event listener of the Marker detects a click.