#8: prepare map

This commit is contained in:
Joerg Reichert 2018-03-31 20:50:38 +02:00
parent 28ade2a8d9
commit 1dca83138a
6 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,6 @@
class GeoController < ApplicationController
def index
render action: "index"
end
end

View file

@ -0,0 +1,25 @@
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 'vendor/modernizr'
= javascript_include_tag 'https://unpkg.com/leaflet@1.0.1/dist/leaflet.js'
= csrf_meta_tags
body
.row
.small-12.columns
.clearfix
h3#title = 'Karte'
div#map/
javascript:
var map = L.map('map').setView([51.4437366804, 11.865234375], 9);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{
attribution: 'Map data &#64; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors</a>',
maxZoom: 12,
minZoom: 8
}
).addTo(map);

View file

@ -25,6 +25,7 @@ html
h1[id="title" class="left"] = link_to 'Stadtratmonitor Leipzig', search_path
div(class="right")
div(class="left") = link_to_unless_current 'Suche', search_path
div(class="left header_indent") = link_to_unless_current 'Karte', geo_path
div(class="left header_indent") = link_to_unless_current 'Glossar', glossary_url
div(class="right header_indent") = link_to_unless_current 'Impressum', impressum_url
div(class="clear")