From 38389c4631aea81bc560d427bbdb13a6b94c0c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B0=A1=E7=85=92=E8=88=AA=20=28Jian=20Weihang=29?= Date: Thu, 4 Sep 2014 02:08:24 +0800 Subject: [PATCH] data attribute options Make use of data attribute, so that we can customise options. for example, to disable map scroll: ```html
``` --- mapmarker.jquery.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mapmarker.jquery.js b/mapmarker.jquery.js index 2066bf8..26b7281 100644 --- a/mapmarker.jquery.js +++ b/mapmarker.jquery.js @@ -29,6 +29,7 @@ zoom: zoom, mapTypeId: google.maps.MapTypeId.ROADMAP } + myOptions = $.extend($(map_element).data(), myOptions); var map = new google.maps.Map(map_element, myOptions); var geocoder = new google.maps.Geocoder(); var infowindow = null;