openstreetmap-tag-map/README.md
2018-12-14 14:00:39 +01:00

1.1 KiB

Openstreetmap custom tag map

Label to generate the openstreetmap iframe from the country and region.

Demo

<map address="valencia" region="spain" width="100%" height="300"></map>

Build the following result:

Install

1 Add Javascript dependencies.

  • Axios
  • Riot
  • Riot compiler
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/3.13.2/riot.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/3.13.2/riot+compiler.min.js"></script>
<script src="map.tag" type="riot/tag"></script>

2 Mount Riot

<script>
    document.addEventListener('DOMContentLoaded', function () {
        riot.mount('*')
    });
</script>
<script src="map.tag" type="riot/tag"></script>

4 Add the HTML tag with your settings

<map address="valencia" region="spain" width="100%" height="300"></map>