aardbodem

Configurable map with a data-config attribute

Ingediend door john op za, 11-06-2016 / 10:29

A configurable map can be configured by a (properly escaped) json configuration in a html data-config attribute.

<div class="configurable-map" data-config='{"view": {"center": [5.87, 51.87], "zoom": 12}}' style="height: 256px;"></div>
<script src="/~john/configurable-maps/configurable-maps.min.js"></script>