mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
Upgrade versions of most packages and make other required changes to ensure compatibility. Update database models and migrations to match new requirements set by Django
45 lines
1.3 KiB
HTML
Executable File
45 lines
1.3 KiB
HTML
Executable File
{% extends 'base.html' %}
|
|
|
|
{% block extra_head %}
|
|
{{ map_markers|json_script:'map-markers' }}
|
|
|
|
{% load static %}
|
|
<script src="{% static 'js/map.js' %}"></script>
|
|
|
|
<script async defer
|
|
src="https://maps.googleapis.com/maps/api/js?key={{ settings.GOOGLE_MAPS_API_KEY }}&callback=initMap"
|
|
type="text/javascript"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item active" aria-current="page">Map</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<h1>Map</h1>
|
|
|
|
<script type="application/javascript">
|
|
function toggleMarkerType(type) {
|
|
for (var i = 0; i < markers.length; i++) {
|
|
if (markers[i].type === type) {
|
|
markers[i].setVisible(!markers[i].getVisible());
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="row mb-2">
|
|
<div class="col-md-3">
|
|
<button class="btn btn-info btn-block" onclick="toggleMarkerType('Person');">Toggle People</button>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<button class="btn btn-info btn-block" onclick="toggleMarkerType('Organisation');">Toggle Organisations</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="map" style="height: 800px; width: 100%"></div>
|
|
|
|
{% endblock %}
|