Nov 20, 2014

Show Current Location In A Google Map Using Google Map API v3

You Can Use Following Code To Show The Current Location In A Google Map Using Google Map API v3. Before Using Make Sure You have Downloaded The "jquery.gmap3.min.js" Java Script File.


<html> 
   <head> 
      <title>Show Current Location Using Google Map v3</title> 
      <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false& libraries=places"></script>
      <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.1.min.js"></script>
      <script type="text/javascript" src="jquery.gmap3.min.js"></script>
   </head> 
   <body>
      <div id="map-canvas" style="width:100%;height:500px;"></div>
      <script type="text/javascript">
        jQuery('#map-canvas').gmap3({
           getgeoloc:{
              callback : function(latLng){
                 if (latLng){
                   $(this).gmap3({
                      marker:{ 
                        latLng:latLng
},
map:{
                         options:{
                           zoom: 14
                        }
}
                   });
                }
              }
           }
        });
      </script> 
   </body>
</html>





Check My Other Articles About Google Maps.

1. Creating A Google Map Using Google Map API v3
2. Show Current Location In A Google Map Using Google Map API v3
3. Getting The Address Of Selected Location In Google Map Using Google Map API v3
4. Getting The Selected Latitude And Longitude From Google Map Using Google Map API v3
5. Google Map With Multiple Markers & Info Windows Using Google Map API v3
6. Getting The Direction Between Two Markers In Google Map Using Google MAP API
7. Getting The Direction Between Two Locations Using Google MAP API
8. Getting The Distance Between Two Markers In Google Map Using Google MAP API
9. Getting The Distance Between Two Locations Using Google MAP API
10. Getting The Nearest Places For A Location In Google Map Using Google MAP API
11. Google Map With InfoBubble
12. Google Maps Creating Polygon And Retrieving Coordinates

No comments:

JWT Token Decode Using Jquery

When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...