Wednesday, 16 September 2015

make a circle of a place in google maps

<html>
<head>
<script
src="http://maps.googleapis.com/maps/api/js">
</script>
<script>
function loadMap(){
   var mapProp = {
     center:new google.maps.LatLng(26.9509557,93.8586473),
     zoom:5,
     mapTypeId:google.maps.MapTypeId.ROADMAP
   };

   var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);  
   var myCity = new google.maps.Circle({
      center:new google.maps.LatLng(26.9509557,93.8586473),
      radius:150600,
      strokeColor:"#B40404",
      strokeOpacity:0.6,
      strokeWeight:2,
      fillColor:"#B40404",
      fillOpacity:0.6
  });
   myCity.setMap(map);
}
</script>
</head>
<body onload="loadMap()">
<div id="googleMap" style="width:580px;height:400px;"></div>
</body>
</html>

No comments:

Post a Comment