Friday, 22 January 2016

To display location on google map with latitude and longitude



<html>
<dsp:page>
<head>
<script src="http://maps.google.com/maps?file=api&amp;amp;amp;amp;amp;v=2&amp;amp;amp;amp;amp;sensor=false&amp;amp;amp;amp;amp;key=<<<<< google API KEY comes here. modify this>>>>>"
            type="text/javascript"></script>
    <script type="text/javascript">


function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng( 29.566603 ,-98.4812067), 13);
      }
}

 
    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng( 29.566603 , -98.4812067), 13);
        map.openInfoWindow(map.getCenter(),
                           document.createTextNode("Hello, world"));
      }
}
    </script>
</head>

<body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 500px; height: 300px"></div>
</body>
 </html>

NOTE: Using google maps we can display single location on the single map or multi locations in a single map.
Kindly go through the links given below for more details.

and for converting
COVERTING DEGREES AND MINUTES TO DECIMALS: go through below link 
degrees and minutes to Decimals

 


REFERENCES: http: //www.geoplaner.com/

0 comments:

Post a Comment

 
;