Cobra967
asked on
Google map API marker information on-click
Hello everyone, I need help integrating the pop info box ( Marker click) into my map page. I know that I need something like:
And my map page code is:
How do I integrate the two codes to play nice with each other? As you can tell, I have 0 experience in this :-)
Thank you a bunch.
var infowindow = new google.maps.InfoWindow({
content: "Test me"
});
google.maps.event.addListener(marker, 'click', function () {
infowindow.open(map, marker);
});
And my map page code is:
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=Secret_code_here=false">
</script>
<body onload="initialize()">
<div id="mapArea" style="width: 500px; height: 500px;">
</div>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</body>
</html>
</asp:Content>
How do I integrate the two codes to play nice with each other? As you can tell, I have 0 experience in this :-)
Thank you a bunch.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hey,
Glad that you got your answer. I was just giving you the example how to put everything in a place.
Regards,
Abhijit
Glad that you got your answer. I was just giving you the example how to put everything in a place.
Regards,
Abhijit
ASKER
I found a better code elsewhere.
ASKER
Open in new window
The result is this:
I really appreciate if you are able to help me out with this.