I am using geocomplete to load the map. My question is, is there any way to get the bound of the map. I used to use
var bounds = results[0].geometry.bounds;
to get the bound is not working here, my code is given below
$("#textfield").geocomplete({
map: ".map_canvas",
details: "form",
types: ["geocode", "establishment"]
})
.bind("geocode:result", function(event, result){
alert(result.geometry.bounds);
alert(result.bounds);
})
both the alerts show ‘undefined’ as the value.
To get the map, you can do this:
then you should be able to use
or any other built in google map api methods.
Edit: Found this in the downloaded script, there is an example ‘Api’.