Browse Source

Change objective.html old markers to green, and add tooltip to objectivemarker

testing
Burathar 4 years ago
parent
commit
9b8d818391
  1. 9
      app/templates/objective.html

9
app/templates/objective.html

@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='assets/leaflet/leaflet.css') }}" />
<script src="{{ url_for('static', filename='assets/leaflet/leaflet.js') }}"></script>
<script src="{{ url_for('static', filename='assets/leaflet/utils.js') }}"></script>
{% endblock %}
{% block app_content %}
@ -62,6 +61,7 @@ @@ -62,6 +61,7 @@
{% block scripts %}
{{ super() }}
<script src="{{ url_for('static', filename='assets/leaflet/utils.js') }}"></script>
<script type="text/javascript", crossorigin="anonymous">
// Leaflet Map
map = getMap()
@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
objective = otherObjectives[i]
if(objective.hash == '{{ objective.hash }}'){continue;}
otherObjectiveMarkers.push(addObjectiveMarker(map, objective, greyIcon))
otherObjectiveMarkers.push(addObjectiveMarker(map, objective, greenIcon))
}
if ('{{ owner }}' == 'True'){
@ -90,6 +90,11 @@ @@ -90,6 +90,11 @@
'{{ objective.longitude }}'
])
}
'{% if objective.hash %}'
objectiveMarker.bindTooltip(`<b>{{ objective.name }}</b>`).openPopup();
'{% else %}'
objectiveMarker.bindTooltip('New Objective').openPopup();
'{% endif %}'
objectiveMarker.addTo(map);
if (otherObjectiveMarkers.length + 1 > 0) {

Loading…
Cancel
Save