Google API for location, based on user IP address

1 view
Skip to first unread message

user3802570 via StackOverflow

unread,
Oct 6, 2015, 4:52:11 AM10/6/15
to google-appengin...@googlegroups.com

.gmap3{ margin: 20px auto; border: 1px dashed #C0C0C0; width: 500px; height: 250px; }

  .test1-result{
    text-align:center;
  }
</style><script type="text/javascript">
  $(function(){ $('#test1').gmap3({
      getgeoloc:{
        callback : function(latLng){
          if (latLng){
            $('#test1-result').html('localised !');
            $(this).gmap3({
              marker:{ 
                latLng:latLng
              }
            });
          } else {
            $('#test1-result').html('not localised !');
          }
        }
      }
    });

  });
</script>  



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/17402103/google-api-for-location-based-on-user-ip-address/32965560#32965560

user3802570 via StackOverflow

unread,
Oct 6, 2015, 5:52:10 AM10/6/15
to google-appengin...@googlegroups.com
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="../jquery/jquery-1.4.4.min.js"></script>
        <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
        <script type="text/javascript" src="../gmap3.js"></script> 
        <style> .gmap3{
                margin: 20px auto;
                border: 1px dashed #C0C0C0;
                width: 500px;
                height: 250px;
            }

            .test1-result{
                text-align:center;
            }
       </style>
       <script type="text/javascript">
  $(function(){ $('#test1').gmap3({
      getgeoloc:{
        callback : function(latLng){
          if (latLng){
            $('#test1-result').html('localised !');
            $(this).gmap3({
              marker:{ 
                latLng:latLng
              }
            });
          } else {
            $('#test1-result').html('not localised !');
          }
        }
      }
    });

  });
</script>  
Reply all
Reply to author
Forward
0 new messages