Technology

Our own Google MAP

<html>
<head>
<meta name=”viewport” content=”initial-scale=1.0, user-scalable=no” />
<script type=”text/javascript” src=”http://maps.google.com/maps/api/js?sensor=true”></script&gt;
<script type=”text/javascript”>
function initialize() {
var latlng = new google.maps.LatLng(-6.8888888, 107.6094157);
var myOptions = {
zoom: 18,
center: latlng,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var map = new google.maps.Map(document.getElementById(“map_canvas”), myOptions);
var latlng = new google.maps.LatLng(-6.8898888, 107.6094157);
var marker = new google.maps.Marker({
position: latlng,
map: map,
title:”20 Solar Panel @50W = 1 kW”
});
var latlngME = new google.maps.LatLng(-6.8900485, 107.6092815);
var markerME = new google.maps.Marker({
position: latlngME,
map: map,
title:”Energy Management Laboratory”
});

var contentString = ‘<div id=”content” width=”400px” height=”400px”>’+
‘<div id=”bodyContent”>’+
‘<p><b>Solar Panel</b><br /> </p>’+
‘</div>’+
‘</div>’;
var contentStringME = ‘<div id=”content” width=”400px” height=”400px”>’+
‘<div id=”bodyContent”>’+
‘<p><b>Energy Management Laboratory</b><br /></p>’+
‘</div>’+
‘</div>’;
var infowindow = new google.maps.InfoWindow({
content: contentString
});
var infowindowME = new google.maps.InfoWindow({
content: contentStringME
});
google.maps.event.addListener(marker, ‘mouseover’, function() {
infowindow.open(map,marker);
});
google.maps.event.addListener(marker, ‘mouseout’, function() {
infowindow.close(map,marker);
});
google.maps.event.addListener(markerME, ‘mouseover’, function() {
infowindowME.open(map,markerME);
});
google.maps.event.addListener(markerME, ‘mouseout’, function() {
infowindowME.close(map,marker);
});

}

</script>
</head>
<body onload=”initialize()”>
<div id=”map_canvas” style=”width:100%; height:100%”></div>
</body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s