Sha256: 75a81a5a825306f275e76a84823106a7a8cedf53c79bd9ce7e2aaab46dbeaa90

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

$(function () {
  // Tries to load the map because we cannot be sure if leaflet and decicim maps is loaded yet (other views can initialize snippets or not)
  const waitForMap = ($map) => {
      const map = $map.data("map");
      if(window.AwesomeMap && window.AwesomeMap.loadMapElements && map) {
        window.AwesomeMap.loadMapElements(map);
    } else {
      setTimeout(() => {
        waitForMap($map);
      }, 100);
    }
  };

  waitForMap($("#awesome-map .google-map"));
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-decidim_awesome-0.7.2 app/assets/javascripts/decidim/decidim_awesome/awesome_map/load_map.js.es6