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
}
精彩评论