javascript google-map

script untuk tampilkan peta berdasarkan lotitude dan longitude

lebih baik gunakan keycode user sendiri

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

</head>
<body onload="initialize()">

 <div id="section_content">
 <h2 id="Geolocation-Map">Geolocation Map</h2>
 <div id="map_canvas" style="width:600px;height:400px;"></div>
 <!-- Google Code for IP Lookup Results Conversion Page -->
 
 </div>
<hr>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
 function initialize() {
 var myLatlng = new google.maps.LatLng(-6.1744,106.8294);
 var myOptions = {
 zoom: 12,
 center: myLatlng,
 navigationControl: true,
 scaleControl: true,
 mapTypeControl: false,
 mapTypeId: google.maps.MapTypeId.ROADMAP
 }
 var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
 var image = 'arrow.png';
 var beachMarker = new google.maps.Marker({
 position: myLatlng,
 map: map,
 icon: image
 });
}
</script>
</body>
</html>

Published by

G3n1k

just to remember what i had known :)

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