bjorn2404 / jQuery-Store-Locator-Plugin

A store locator plugin using Google Maps API version 3
MIT License
495 stars 235 forks source link

Feature request: json config #193

Open Teisi opened 7 years ago

Teisi commented 7 years ago

hello, i want to use json for the plugin config. but the gmaps rendering option (mapTypeId: google.maps.MapTypeId.ROADMAP) breaks the json.

"mapSettings": {
      "zoom": 12,
       "mapTypeId": google.maps.MapTypeId.ROADMAP
    },

can you give us a option to add/set something like this per data-attr or something?

my workaround actually is: in file "jquery.storelocator.js" at the beginning: var typeid = $(".storelocator").data("maptypeid"); AND after line 2586 ("_this.map = new google.maps.Map(document.getElementById(_this.settings.mapID), myOptions);")

I added: "_this.map.setMapTypeId(typeid);"

Thank you!