有人能指出我的教程或解释如何将jQuery Static Gmap Zoom - http://www.phpgeek.dk/staticgmapzoom与Google Maps集成。
具体来说,我正在尝试使用Google Maps API v3和jQuery Static Gmap Zoom显示我网站访问者位置的地图。
谢谢!
尔杰斯
答案 0 :(得分:0)
这是如何找到位置。将ip更改为您的客户端IP。结果是xml格式。
http://ipinfodb.com/ip_query.php?ip=127.0.0.1&timezone=false
一旦你得到lat& lng,这是精确定位的javascript指南
var lat = 1.0001;
var lng = 0.1111;
var mapOptions = {
center: new google.maps.LatLng(lat, lng);
, scrollwheel: false
, mapTypeId: google.maps.MapTypeId.ROADMAP
, zoom: 14
};
var yourNode = ...;
var canvas = new google.maps.Map(yourNode, mapOptions);