mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
refactor: add map marker to context on update
This commit is contained in:
@@ -2,27 +2,12 @@
|
||||
|
||||
{% block extra_head %}
|
||||
{% load staticfiles %}
|
||||
<script type="application/javascript">
|
||||
const data = [
|
||||
{
|
||||
name: '{{ organisation.name }}',
|
||||
lat: '{{ organisation.latitude }}',
|
||||
lng: '{{ organisation.longitude }}'
|
||||
},
|
||||
]
|
||||
|
||||
const settings = {
|
||||
zoom: 2,
|
||||
centre_lat: '{{ organisation.latitude }}',
|
||||
centre_lng: '{{ organisation.longitude }}',
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- {{ map_markers|json_script:'map-markers' }} -->
|
||||
{{ map_markers|json_script:'map-markers' }}
|
||||
|
||||
<script src="{% static 'js/map.js' %}"></script>
|
||||
<script src="{% static 'js/location_picker.js' %}"></script>
|
||||
|
||||
<script async defer src="https://maps.googleapis.com/maps/api/js?key={{ settings.GOOGLE_MAPS_API_KEY }}&callback=initMap&libraries=places"
|
||||
<script async defer src="https://maps.googleapis.com/maps/api/js?key={{ settings.GOOGLE_MAPS_API_KEY }}&callback=initPicker&libraries=places"
|
||||
type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -2,25 +2,12 @@
|
||||
|
||||
{% block extra_head %}
|
||||
{% load staticfiles %}
|
||||
<script type="application/javascript">
|
||||
const data = [
|
||||
{
|
||||
name: '{{ person.name }}',
|
||||
lat: '{{ answer_set.latitude }}',
|
||||
lng: '{{ answer_set.longitude }}'
|
||||
},
|
||||
]
|
||||
|
||||
const settings = {
|
||||
zoom: 2,
|
||||
centre_lat: '{{ answer_set.latitude }}',
|
||||
centre_lng: '{{ answer_set.longitude }}',
|
||||
}
|
||||
</script>
|
||||
{{ map_markers|json_script:'map-markers' }}
|
||||
|
||||
<script src="{% static 'js/map.js' %}"></script>
|
||||
<script src="{% static 'js/location_picker.js' %}"></script>
|
||||
|
||||
<script async defer src="https://maps.googleapis.com/maps/api/js?key={{ settings.GOOGLE_MAPS_API_KEY }}&callback=initMap&libraries=places"
|
||||
<script async defer src="https://maps.googleapis.com/maps/api/js?key={{ settings.GOOGLE_MAPS_API_KEY }}&callback=initPicker&libraries=places"
|
||||
type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user