map-fullsize.html 751 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. layout: default
  3. libs: google-maps
  4. layout-wrapper-full: true
  5. layout-sidebar: true
  6. layout-hide-topbar: true
  7. menu: base.map-fullsize
  8. ---
  9. {% assign map-id = 'google' %}
  10. <div class="map flex-fill" id="map-{{ map-id }}"></div>
  11. {% capture_global scripts %}
  12. <script>
  13. // @formatter:off
  14. let map;
  15. {% if jekyll.environment == 'development' %}window.tabler_map = window.tabler_map || {};{% endif %}
  16. document.addEventListener("DOMContentLoaded", function() {
  17. map = new google.maps.Map(document.getElementById("map-{{ map-id }}"), {
  18. center: { lat: -34.397, lng: 150.644 },
  19. zoom: 8,
  20. });
  21. {% if jekyll.environment == 'development' %}window.tabler_map["map-{{ map-id }}"] = map;{% endif %}
  22. });
  23. // @formatter:on
  24. </script>
  25. {% endcapture_global %}