I've just setup a new project following this video http://youtu.be/R0l-7en3dUw.
I was wondering how can I set the map zoom level in a project like this.
I've looked at the src on github and since in map.coffee
there isn't something like zoomTo: (zoomLvl)-> @getServiceObject().setZoom(zoomLvl)
I don't have any idea how to do it. So can anyone help me?
I've tried this kind of solution as suggested here (zoom in to particular region in gmap4rails) but with any good result:
Gmaps.map.callback = function() {
google.maps.event.addListenerOnce(Gmaps.map.getMapObject(), 'idle', function(){
var bounds = new google.maps.LatLngBounds(new google.maps.LatLng(10, 0), new google.maps.LatLng(0, 10));
Gmaps.map.serviceObject.panToBounds(bounds);
}
});