On May 16, 7:22 am, Draiken <[email protected]> wrote: > Hi, I am trying to restrict the search from the geocoder to a certain > LatLngBounds > > I am getting two strange behaviours: > > 1 - When positioning the center in > Lat: -25.42777778 > Lng: -49.27305556 > Zoom: 12 > Then searching "getúlio" in geocoder address within the bounds of > that map > > I get the result off a place WAY out of the bounds I set on the > geocoder request > > 2 - To check that, I tried to use the contains() method over the two > bounds and got an error: > map.getBounds().containts( results[0].geometry.bounds ); > > I get the error: > a.lat is not a function on line 15
contains (I assume the "containts" is a typo) takes a LatLng as an argument, not a LatLngBounds. contains(latLng:LatLng) boolean Returns true if the given lat/lng is in this bounds. -- Larry > > I've checked and both the map.getBounds() and the > results[0].geometry.bounds do return correct bounds > > If the bounds passed on the GeocoderRequest are not meant to restrict > results for that area, I don't know what is the function of that. > > Please any help is appreciated. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
