"Integrate Google Map in a .Net Web Application"
    In this article I have discussed how to integrate Google map in a .Net Application.
Getting Started:
Make a web application, and write the following HTML in the aspx page:
<html>
<head>
</head>
<body onload="initialize();">
 <div id="mapcanvas" style="width:700px; height:500px;"></div>
 </body>
</html>
Now inside the <head> tag add a script reference of the Google Api as follows:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/jsv=3.exp">   </script>
Now add the following javascript code below this reference:
    <script type="text/javascript">
     var map;
   function initialize() 
    { 
      var mapOptions = {
      center: new google.maps.LatLng('23.11', '71.00'),
      zoom: 2,
      scrollwheel: false,
      disableDefaultUI: false,
      mapTypeId: google.maps.MapTypeId.ROADMAP
 };
  map = new google.maps.Map(document.getElementById("mapcanvas"),mapOptions);
 }
Run the application, your Google Map is Integrated with the center at LatLng('23.11', '71.00').(You can change this as per your requirement.)
Happy Coding...!
                       
                    
0 Comment(s)