jmelosegui / GooglemapMvc

The control wraps Google maps API simplifying the use of Google maps in ASP.NET MVC applications.
MIT License
116 stars 61 forks source link

Disable zooming with mouse wheel #90

Closed yoan-krumov closed 8 years ago

yoan-krumov commented 8 years ago

Hi,

is there a functionality for disabling the zoom performed wtih the mouse wheel? If not, you can consider this as a feature request :)

p.s. I think that DisableScrollWhellZoom() or ScrollWheel=False are good options.

jmelosegui commented 8 years ago

Hi @YoanX1,

That feature is not available in the control, but is a simple one to implement. I would rather do something like:

@(Html.GoogleMap()
          .Name("map")
          .ScrollWheel(false))

to keep discoverability of this control consistent with the google map api (the ScrollWheel value should be true by default)

So if you feel confident enough with this one I'll be willing to review and accept your pull request :)

Thanks for your feed back.

yoan-krumov commented 8 years ago

Hi,

I do not have a pull request, but I agree about the name of the property. It should be consistent with the official api.

jmelosegui commented 8 years ago

Hi @YoanX1,

Just pushed a change that should resolve your request.

If you need to see the feature live, go here and change the Scroll Wheel value to see this in action.

Also take a look to the following link, that could be helpful if you need to use this feature right away.

https://github.com/jmelosegui/GooglemapMvc#links.

jhallam3 commented 8 years ago

Hi, trying this now and still doesn't work .. Im using 0.8.0

screen shot 2016-08-06 at 13 45 09