mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
36 lines
1.2 KiB
Text
36 lines
1.2 KiB
Text
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'
|
|
= javascript_include_tag 'geo'
|
|
= javascript_include_tag 'https://unpkg.com/leaflet@1.0.1/dist/leaflet.js'
|
|
= javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'
|
|
= csrf_meta_tags
|
|
|
|
body
|
|
.row
|
|
.small-12.columns
|
|
.clearfix
|
|
h3#title = 'Stadtbezirksräte und Ortschaftsräte'
|
|
div#map/
|
|
javascript:
|
|
var map = L.map('map').setView([51.3399028, 12.3742236], 12);
|
|
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
{
|
|
attribution: 'Map data @ <a href="http://openstreetmap.org">OpenStreetMap</a> contributors</a>',
|
|
maxZoom: 16,
|
|
minZoom: 12
|
|
}
|
|
).addTo(map);
|
|
$.ajaxSetup({
|
|
scriptCharset: "utf-8",
|
|
contentType: "application/json; charset=utf-8"
|
|
});
|
|
|
|
var geojsonLayer = L.geoJson(geojsonDaten());
|
|
map.addLayer(geojsonLayer);
|
|
|
|
registerListeners(map, geojsonLayer)
|
|
|