ubilabs / geocomplete

jQuery Geocoding and Places Autocomplete Plugin
http://ubilabs.github.com/geocomplete/
MIT License
1.22k stars 406 forks source link

Zoom in and out with mouse scroll ? #32

Closed andyscott12 closed 11 years ago

andyscott12 commented 11 years ago

Hi,

Just wondering whether its possible to:

  1. Setup the controls on the map
  2. Scroll with the mouse wheel in and out for zooming ?

I can't seem to find how to do that ?

sammyfa commented 11 years ago

@andyscott12 Don't understand your question 1, but for question 2:

$(".yourtextbox").geocomplete({
    mapOptions: { scrollwheel: true },
    //...other args
});
aemkei commented 11 years ago

You can add any options to the plugin map constructor via mapOptions.

To add new controls, simply pass the options like this.

$(".yourtextbox").geocomplete({
    mapOptions: { 
      panControl: false,
      zoomControl: false,
      scaleControl: true 
    },
    //...other args
});

More infos here: https://developers.google.com/maps/documentation/javascript/controls#Adding_Controls_to_the_Map

andyscott12 commented 11 years ago

Awesome thanks!