map-fullsize.html 744 B

12345678910111213141516171819202122232425262728293031
  1. ---
  2. page-libs: [google-maps]
  3. layout-wrapper-full: true
  4. layout-sidebar: true
  5. layout-hide-topbar: true
  6. menu: base.map-fullsize
  7. ---
  8. {% assign map-id = 'google' %}
  9. <div class="map flex-fill" id="map-{{ map-id }}"></div>
  10. {% comment %}
  11. {% capture_global scripts %}
  12. <script>
  13. // @formatter:off
  14. let map;
  15. {% if env == '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 env == 'development' %}window.tabler_map["map-{{ map-id }}"] = map;{% endif %}
  22. });
  23. // @formatter:on
  24. </script>
  25. {% endcapture_global %}
  26. {% endcomment %}