Skip to content

Commit 45cb909

Browse files
authored
Update jquery.storelocator.js
Added "getMap" function that returns an google.maps.Map instance
1 parent dc137e2 commit 45cb909

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/js/jquery.storelocator.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,17 @@
376376
}
377377
},
378378

379+
/**
380+
* Get google.maps.Map instance
381+
*
382+
* @returns {Object} google.maps.Map instance
383+
*/
384+
getMap: function() {
385+
var myOptions = this.settings.mapSettings;
386+
var map = new google.maps.Map(document.getElementById(this.settings.mapID), myOptions);
387+
return map;
388+
},
389+
379390
/**
380391
* Load templates via Handlebars templates in /templates or inline via IDs - private
381392
*/

0 commit comments

Comments
 (0)