cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

geocoding with bounds

Open Slavrix opened this issue 11 years ago • 6 comments

Looking through the plugin code, it should support geocoding with a bounds set to the request along with the address. I created a bounds using the plugins built in plugin.google.maps.LatLng and plugin.google.maps.LatLngBounds

when passing the bounds object in the geocodeing request

Geocode.geocode({ 'address': query, 'bounds': theBounds }

I get an empty string returned.

something I noticed, is that when the latLngBounds is created it creates an JSON 'bounds':{ 'northeast':{ 'lat':, 'lng': }, 'southwest':{ 'lat':, 'lng': } }

but the code in mygeocoder.java and mygeocoder.m are looking for bounds.northeast.latitude, bounds.northeast.longitude, bounds.southwest.latitude, bounds.southwest.longitude,

so i assume, since it cant find anything within a bounds on undefined, its returning nothing. or something like this.

am i looking at it wrong or doing something wrong with it ?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Slavrix avatar Sep 16 '15 09:09 Slavrix

Did you try to change the source, maybe you were on the right path. I don't have time to dig into this currently.

hirbod avatar Oct 11 '15 22:10 hirbod

ill give it a go

Slavrix avatar Oct 11 '15 23:10 Slavrix

any progress on this?

hirbod avatar Oct 19 '15 13:10 hirbod

havnt had a chance to yet, but ill check it out when i can

Slavrix avatar Nov 18 '15 04:11 Slavrix

I'll reopen till you find a solution

hirbod avatar Dec 07 '15 05:12 hirbod

+1

walfridosp avatar Jul 23 '16 20:07 walfridosp