0
Hello, how do I run onclick on a map marketer?
My code is this:
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
icon: andando,
shape: shape,
title: beach[0],
html: beach[5],
zIndex: beach[3]
});
on onclick I need you to open a popup and pass a value to the popup, the value I’m getting on the beach[5].
var Marker = new google.maps.Marker({ position: myLatLng, map: map, icon: walking, Shape: Shape, title: beach[0], html: beach[5], zIndex: beach[3] }); google.maps.Event.addListener(Marker, 'click', Function() ' popupMarker(Marker.html); });
– Lucas Spielmann
couldn’t...
– Lucas Spielmann
Couldn’t make the event work or the popup? Do you already have the code to show the popup or some window? If you have another part of code, please post.
– Zulian
Marker.addListener('click', Function(){ window.open('test.php'); });
– Lucas Spielmann
I got this, but the value of beach[5] could not pass the test.php
– Lucas Spielmann
Then your question is to pass the variable to the file
teste.php
. That?– Zulian
I got it, thanks.
– Lucas Spielmann