开发者

Google Maps API v3 Geocoder.geocode() argument "location" not works

开发者 https://www.devze.com 2023-01-21 22:54 出处:网络
There is \"location\" property in GeocoderRequest object, that defines \"LatLng about which to search. Optional.\", I\'m trying to use it, but it does not work:开发者_如何学JAVA

There is "location" property in GeocoderRequest object, that defines "LatLng about which to search. Optional.", I'm trying to use it, but it does not work:开发者_如何学JAVA

geocoder.geocode( { address: control.value, location: new google.maps.LatLng(59.938531, 30.313497)}, function(results, status) {....})

For example, when I'm searching for some address in 59.938531, 30.313497, so results contains 2 objects, and the right address has index [1] but not [0].


Language parameter in JavaScript call by geocoder not supported:

http://code.google.com/intl/th-TH/apis/maps/documentation/javascript/reference.html#Geocoder


The location is not valid. You want either address or latLng. The GeocodeRequest object literal contains the following fields:

{
 address: string,
 latLng: LatLng,
 bounds: LatLngBounds,
 language: string,
 region: string
}
0

精彩评论

暂无评论...
验证码 换一张
取 消