Update map app (location, migrations and templates)

This commit is contained in:
Livvy Mackintosh
2017-05-21 01:47:14 +02:00
parent c235779631
commit f1d8f00af0
16 changed files with 183 additions and 9 deletions

View File

@ -0,0 +1,29 @@
{% load i18n %}
{% load leaflet_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% trans "Ojuso Platform Map" %}</title>
{% leaflet_js %}
{% leaflet_css %}
</head>
<body>
<h1>Ojuso Platform Map</h1>
{% leaflet_map "main" callback="main_app_init" %}
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous">
</script>
<script type="text/javascript">
function main_app_init(map, options) {
var dataurl = '{% url "data" %}';
// Download GeoJSON
$.getJSON(dataurl, function (data) {
L.geoJson(data).addTo(map);
});
}
</script>
</body>
</html>