Commit 025a8e3d authored by Tobias Zeumer's avatar Tobias Zeumer

Switch most layers to "grouped" mode in uMap

parent 538f39f9
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -121,6 +121,8 @@ function createGeoJson($fields) {
// Data from Wikidata - see Readme.md
function createGeoJsonInstitute($fields, $save) {
$umap_coords = true;
//DekanatLabel,Institut,Institut_de,Institut_en,Kurz,,Leitung,LeitungLabel,Lage
foreach ($fields as $entry) {
if (!$entry['Lage']) {
......@@ -134,6 +136,39 @@ function createGeoJsonInstitute($fields, $save) {
$lon = $coord[0];
$lat = $coord[1];
// Adjust coordinates for better display in umap
if ($umap_coords) {
switch ($entry['StrasseNo']) {
case 'Eißendorfer Straße 42 (M)':
$lon = '9.968274235725405'; $lat = '53.45881793842379'; break;
case 'Eißendorfer Straße 40 (N)':
$lon = '9.969363212585451'; $lat = '53.459172468359874'; break;
case 'Denickestraße 15 (K)':
$lon = '9.96782898902893'; $lat = '53.46059375234547'; break;
case 'Denickestraße 22 (I)':
$lon = '9.9698942899704'; $lat = '53.461242097552585'; break;
case 'Eißendorfer Straße 38 (O)':
$lon = '9.970044493675234'; $lat = '53.45993581556092'; break;
case 'Am Irrgarten 3-9 (Q)':
$lon = '9.971069097518923'; $lat = '53.45957490415951'; break;
case 'Am Irrgarten 3-6 (Q)':
$lon = '9.971069097518923'; $lat = '53.45957490415951'; break;
case 'Am Schwarzenberg-Campus 3 (E)':
$lon = '9.969234466552736'; $lat = '53.46193514527395'; break;
case 'Am Schwarzenberg-Campus 4 (D)':
$lon = '9.969052076339722'; $lat = '53.463270108539035'; break;
case 'Am Schwarzenberg-Campus 4 (C)':
$lon = '9.969760179519655'; $lat = '53.46314874997682'; break;
case 'Blohmstraße 20':
$lon = '9.981197118759157'; $lat = '53.466201770490336'; break;
case 'xxx':
$lon = 'xx'; $lat = 'xxx'; break;
}
}
$name = $entry['Institut_de'];
if ($entry['Kurz']) $name .= ' ('.$entry['Kurz'].')';
$description = '*'.$entry['Institut_en'].'*\n\n**Kontakt**\n';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment