Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
richmap
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<title>Rich Marker - Click Event</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<!--<script src="./richmarker.js" type="text/javascript" charset="iso-8859-1"></script>-->
<script src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/src/richmarker.js" type="text/javascript" charset="iso-8859-1"></script>
<style>
div.richMarkerDiv {
background-color: #ffffff;
width: 200px;
color: #000000;
}
.clickable {
cursor: pointer;
text-decoration: underline;
}
</style>
<script>
function initialize() {
var myOptions = {
zoom: 8,
center: new google.maps.LatLng(41.674630, 1.290680),
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
var richMarkerHtml = "<div class='richMarkerDiv'><center><p>Rich Marker & Firefox 6<br>onclick event error sample.<br>Click on the link below</p>";
richMarkerHtml += "<a onclick='markerClicked()' class='clickable'>Tikla</a></center></div>";
var marker = new RichMarker({
map: map,
position: new google.maps.LatLng(41.674630, 1.290680),
draggable: false,
content: richMarkerHtml
});
}
function markerClicked() {
alert( "Marker Clicked!!!! (alert message for sample purposes.)" );
}
</script>
</head>
<body onload='initialize()'>
<div id="map" style="width: 800px; height: 600px;border:1px #000000 solid"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment