Change Google Maps v3 mapOptions object after load

前端 未结 3 714
小蘑菇
小蘑菇 2020-12-29 22:55

How can i modify a V3 map\'s mapOptions (after the initial map has been loaded)?

Specifically, I would like to be able to flip the

draggable: false
         


        
3条回答
  •  感动是毒
    2020-12-29 23:25

    Found that I don't even need jQuery for this – it's already part of the Google Maps API. Simply do:

    map.set('draggable', true);
    

    Too easy! Hope it helps someone.

提交回复
热议问题