{% load jsonify staticfiles %}

<script type="text/javascript">
{% block settings_javascript %}

var SITE_NAME = '{{ WAZIMAP.name }}';
var SITE_URL = '{{ WAZIMAP.url }}';
var EMBED_URL = '{{ WAZIMAP.embed_url|default:WAZIMAP.url }}';
var WAZIMAP_COUNTRY_CODE = '{{ WAZIMAP.country_code }}';
var GOOGLE_GEOCODE_API_KEY = '{{ WAZIMAP.google_geocode_api_key }}';
var GEOMETRY_DEFAULT_GEO_VERSION = {{ geo_data.default_version|jsonify|safe }};

var GEOMETRY_URLS = {
  {% for geo_version, data in WAZIMAP.geometry_data.items %}
    '{{ geo_version }}': {
      {% for level, path in data.items %}
      '{{ level }}': '{% static path %}' {% if not forloop.last %},{% endif %}
      {% endfor %}
    } {% if not forloop.last %},{% endif %}
  {% endfor %}
};

// standard mapping of summary level code to summary level name
var sumlevMap = {{ geo_data.geo_levels|jsonify|safe }};

var releaseNames = {};
var RELEASE = '{{ primary_releases.active.year }}';
{% endblock settings_javascript %}
</script>
