0
我拉数据库中的纬度长点,将它们合并,然后使用反向查找在我的地图上放置标记。所有的标记都放在地图上,但它们只是一点点关闭。然后我去maps.google.com并将这些点放到搜索栏中,并且它们完美地工作。有什么建议么?谢谢!该功能可按低于:如果来自GeoCode的Google地图标记有点关闭
var lat = resultP[i].get("lat");
var log = resultP[i].get("long");
var latlng = new google.maps.LatLng(lat, log);
geocoder.geocode({ 'latLng': latlng}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + status);
} //end else
什么你受了一点意思了吗? –
例如,纬度是42.476185和日志是-96.363533然后我运行geocoder.geocode和我的纬度和日志变为42.4766488,-96.36351719999999(results [0] .geometry.location) –
我一直在努力,这似乎是我的标记在最近的道路上呈现。我正试图在网球场/垒球场上放置一个标记。我如何让标记不要走近最近的道路?谢谢。 –