stadtratmonitor/app/views/geo/index.html.slim

38 lines
1.3 KiB
Text
Raw Normal View History

2018-03-31 20:50:38 +02:00
doctype html
html
head
title Stadtratmonitor Leipzig - Karte
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= stylesheet_link_tag 'https://unpkg.com/leaflet@1.0.1/dist/leaflet.css'
2019-06-13 23:10:45 +02:00
= javascript_include_tag 'geo'
2018-03-31 20:50:38 +02:00
= javascript_include_tag 'vendor/modernizr'
= javascript_include_tag 'https://unpkg.com/leaflet@1.0.1/dist/leaflet.js'
2019-06-13 23:10:45 +02:00
= javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'
2018-03-31 20:50:38 +02:00
= csrf_meta_tags
body
.row
.small-12.columns
.clearfix
2019-06-13 23:10:45 +02:00
h3#title = 'Stadtbezirksräte und Ortschaftsräte'
2018-03-31 20:50:38 +02:00
div#map/
javascript:
2019-06-10 15:04:02 +02:00
var map = L.map('map').setView([51.3399028, 12.3742236], 12);
2018-03-31 20:50:38 +02:00
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{
attribution: 'Map data &#64; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors</a>',
2019-06-10 15:04:02 +02:00
maxZoom: 16,
minZoom: 12
2018-03-31 20:50:38 +02:00
}
2019-06-13 23:10:45 +02:00
).addTo(map);
$.ajaxSetup({
scriptCharset: "utf-8",
contentType: "application/json; charset=utf-8"
});
var geojsonLayer = L.geoJson(geojsonDaten());
map.addLayer(geojsonLayer);
registerListeners(map, geojsonLayer)