Vorlage:Gebäude/Karte: Unterschied zwischen den Versionen

Aus FürthWiki

Verbesserte Einzel-Gebäude-Behandlung
(Job starten, um Geokoordinaten neu zu ermitteln)
(Verbesserte Einzel-Gebäude-Behandlung)
Zeile 1: Zeile 1:
<noinclude>{{IstKlasse|Gebäude}}</noinclude><includeonly><!--
<noinclude>{{IstKlasse|Gebäude}}</noinclude><includeonly><!--


--> {{#if: {{#if: {{{lat|}}} | {{{lon|}}} }} {{{location|}}} {{{geojson|}}} {{ifl | {{{GeoJsonKarte|}}} }} {{#ifexist: GeoJson:{{PAGENAME}} | ja }}   <!-- Soll überhaupt ein Kartentab angezeigt werden?
--> {{#if: {{#if: {{{lat|}}} | {{{lon|}}} }} {{{location|}}} {{{geojson|}}} {{ifl | {{{GeoJsonKarte|}}} }} {{#ifexist: GeoJson:{{PAGENAME}} | ja }} <!-- Soll überhaupt ein Kartentab angezeigt werden?
-->        {{ifl | {{{Ehemals|}}} | | nein }} {{{Straße|}}} {{{Straße2|}}} {{{Straße3|}}}                                                             <!--  
-->        {{ifl | {{{Ehemals|}}} | | nein }} {{{Straße|}}} {{{Straße2|}}} {{{Straße3|}}}                                                           <!--  
--> | {{ Karte                                                                                                                                       <!--
--> | {{ Karte                                                                                                                                       <!--
-->  | lat={{{lat|}}}                                                                                                                               <!--
-->  | lat={{{lat|}}}                                                                                                                               <!--
-->  | lon={{{lon|}}}                                                                                                                               <!--
-->  | lon={{{lon|}}}                                                                                                                               <!--
-->  | locationlist=                                                                                                                                 <!--
-->  | locationlist=                                                                                                                               <!--
-->    {{#if: {{{location|}}}                                                                                                                       <!-- location in Liste aufnehmen
-->    {{#if: {{{location|}}}                                                                                                                       <!-- location in Liste aufnehmen
-->    | {{{location|}}}~[[{{PAGENAME}}]];                                                                                                           <!--
-->    | {{{location|}}}~[[{{PAGENAME}}]];                                                                                                         <!--
-->    }}                                                                                                                                           <!--
-->    }}                                                                                                                                           <!--
-->    {{#arraymap: {{#ask: [[:+]] [[!{{PAGENAME}}]] [[Kategorie:Gebäude]] [[AnzahlGebäude::1]] [[TeilDesGebäudeKomplexes::{{PAGENAME}}]]           <!-- alle Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->    {{#arraymap: {{#ask: [[:+]] [[!{{PAGENAME}}]] [[Kategorie:Gebäude]] [[AnzahlGebäude::1]] [[TeilDesGebäudeKomplexes::{{PAGENAME}}]]           <!-- alle Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->                  | format=plainlist | sep=_;_ | link=none }}                                                                                     <!--
-->                  | format=plainlist | sep=_;_ | link=none }}                                                                                     <!--
-->    | _;_ | _g_                                                                                                                                   <!--
-->    | _;_ | _g_                                                                                                                                 <!--
-->    | {{#arraymap: {{#show: _g_ | ?Geokoordinate | format=plainlist | link=none | valuesep=_;_ }} | _;_ | _k_                                     <!-- alle Geokoordinaten der Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->    | {{#arraymap: {{#show: _g_ | ?Geokoordinate | format=plainlist | link=none | valuesep=_;_ }} | _;_ | _k_                                   <!-- alle Geokoordinaten der Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->      | {{#coordinates: _k_ | format=float | directional=no }}~[[_g_]];                                                                           <!-- kompaktere Darstellung via float nötig bei langer location-Liste
-->      | {{#coordinates: _k_ | format=float | directional=no }}~[[_g_]];                                                                         <!-- kompaktere Darstellung via float nötig bei langer location-Liste
-->      |                                                                                                                                           <!-- kein Semikolon
-->      |                                                                                                                                         <!-- kein Semikolon
-->      }}                                                                                                                                         <!--
-->      }}                                                                                                                                         <!--
-->    |                                                                                                                                             <!--
-->    |                                                                                                                                           <!--
-->    }}                                                                                                                                           <!--
-->    }}                                                                                                                                           <!--
-->    {{#if: {{{Straße|}}} {{{Straße2|}}} {{{Straße3|}}}                                                                                           <!--
-->    {{#if: {{{Straße|}}} {{{Straße2|}}} {{{Straße3|}}}                                                                                           <!--
-->    | {{#arraymap: {{{Straße|}}};{{{Straße2|}}};{{{Straße3|}}} | ; | _s_                                                                         <!-- durch alle Straße/Hausnummer-Kombis durchiterieren
-->    | {{#arraymap: {{{Straße|}}};{{{Straße2|}}};{{{Straße3|}}} | ; | _s_                                                                         <!-- durch alle Straße/Hausnummer-Kombis durchiterieren
-->      | {{#arraymap: {{#switch: _s_ | {{{Straße|}}}={{{Hausnummer|}}} | {{{Straße2|}}}={{{Hausnummer2|}}} | {{{Straße3|}}}={{{Hausnummer3|}}} }} <!--
-->      | {{#arraymap: {{#switch: _s_ | {{{Straße|}}}={{{Hausnummer|}}} | {{{Straße2|}}}={{{Hausnummer2|}}} | {{{Straße3|}}}={{{Hausnummer3|}}} }} <!--
-->        | ; | _h_                                                                                                                                 <!--
-->        | ; | _h_                                                                                                                               <!--
-->        | {{#ifexpr: {{#ask: [[:+]] [[!{{PAGENAME}}]] [[Kategorie:Gebäude]] [[AnzahlGebäude::1]] [[StraßeHnr::_s_ _h_]] | format=count }} > 0    <!-- Einzel-Gebäude-Seite(n) via StraßeHnr auf Vorhandensein prüfen
-->        | {{#ifexpr: {{#show: {{PAGENAME}} | ?AnzahlGebäude }} > 1                                                                               <!-- Gebäude-Komplex?
-->           | {{#arraymap: {{#ask: [[:+]] [[!{{PAGENAME}}]] [[Kategorie:Gebäude]] [[AnzahlGebäude::1]] [[StraßeHnr::_s_ _h_]]                       <!-- alle Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->           | {{#ifexpr: {{#ask: [[:+]] [[!{{PAGENAME}}]] [[Kategorie:Gebäude]] [[AnzahlGebäude::1]] [[StraßeHnr::_s_ _h_]] | format=count }} > 0  <!-- Einzel-Gebäude-Seite(n) via StraßeHnr auf Vorhandensein prüfen
-->                          | format=plainlist | sep=_;_ | link=none }}                                                                              <!--
-->            | {{#arraymap: {{#ask: [[:+]] [[!{{PAGENAME}}]] [[Kategorie:Gebäude]] [[AnzahlGebäude::1]] [[StraßeHnr::_s_ _h_]]                    <!-- alle Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->            | _;_ | _g_                                                                                                                          <!--
-->                           | format=plainlist | sep=_;_ | link=none }}                                                                           <!--
-->            | {{#arraymap: {{#show: _g_ | ?Geokoordinate | format=plainlist | link=none | valuesep=_;_ }} | _;_ | _k_                            <!-- alle Geokoordinaten der Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->              | _;_ | _g_                                                                                                                        <!--
-->               | {{#coordinates: _k_ | format=float | directional=no }}~[[_g_]];                                                                  <!-- kompaktere Darstellung via float nötig bei langer location-Liste
-->              | {{#arraymap: {{#show: _g_ | ?Geokoordinate | format=plainlist | link=none | valuesep=_;_ }} | _;_ | _k_                          <!-- alle Geokoordinaten der Einzel-Gebäude-Seite(n) (sicherheitshalber) durchiterieren
-->              |                                                                                                                                   <!-- kein Semikolon
-->                 | {{#coordinates: _k_ | format=float | directional=no }}~[[_g_]];                                                                <!-- kompaktere Darstellung via float nötig bei langer location-Liste
-->              }}                                                                                                                                  <!--
-->                 |                                                                                                                                <!-- kein Semikolon
-->            |                                                                                                                                    <!-- kein Semikolon
-->                }}                                                                                                                               <!--
-->            }}                                                                                                                                    <!--
-->              |                                                                                                                                 <!-- kein Semikolon
-->          | {{#ifexist: _s_ _h_                                                                                                                  <!-- Einzel-Gebäude-Seite(n) auf Vorhandensein prüfen
-->              }}                                                                                                                                 <!--
-->             | {{#ifexpr: {{#len: {{#replace:          _s_ _h_                        | {{PAGENAME}} | }} }} = 0 or                              <!-- Sich selbst erkennen, wenn "_s_ _h_" = {{PAGENAME}} oder
-->             | {{#ifexist: _s_ _h_                                                                                                                <!-- Einzel-Gebäude-Seite(n) auf Vorhandensein prüfen
-->                         {{#len: {{#replace: {{#show: _s_ _h_ | ?Seite | link=none }} | {{PAGENAME}} | }} }} = 0                                  <!-- Seite-Attribut von "_s_ _h_" = {{PAGENAME}}. Damit werden auch Weiterleitungen abgefangen
-->              | {{#ifexpr: {{#len: {{#replace:          _s_ _h_                         | {{PAGENAME}} | }} }} = 0 or                            <!-- Sich selbst erkennen, wenn "_s_ _h_" = {{PAGENAME}} oder
-->               | {{ifl | {{{Ehemals|}}} | | _s_ _h_,Fürth,Bayern,{{{PLZ|}}},Deutschland~[[_s_ _h_]]; }}                                            <!-- dann nach sich selbst suchen
-->                           {{#len: {{#replace: {{#show: _s_ _h_ | ?Seite | link=none }} | {{PAGENAME}} | }} }} = 0                              <!-- Seite-Attribut von "_s_ _h_" = {{PAGENAME}}. Damit werden auch Weiterleitungen abgefangen
-->               | {{#if: {{#show: _s_ _h_ | ?Geokoordinate | link=none }}                                                                           <!--  
-->                | {{ifl | {{{Ehemals|}}} | | _s_ _h_,Fürth,Bayern,{{{PLZ|}}},Deutschland~[[_s_ _h_]]; }}                                        <!-- dann nach sich selbst suchen
-->                | {{#arraymap: {{#show: _s_ _h_ | ?Geokoordinate | format=plainlist | link=none | valuesep=_;_ }} | _;_ | _k_                    <!-- alle Geokoordinaten der Einzel-Gebäude-Seite (sicherheitshalber) durchiterieren
-->                | {{#if: {{#show: _s_ _h_ | ?Geokoordinate | link=none }}                                                                       <!--  
-->                  | {{#coordinates: _k_ | format=float | directional=no }}~[[_s_ _h_]];                                                          <!-- kompaktere Darstellung via float nötig bei langer location-Liste
-->                  | {{#arraymap: {{#show: _s_ _h_ | ?Geokoordinate | format=plainlist | link=none | valuesep=_;_ }} | _;_ | _k_                  <!-- alle Geokoordinaten der Einzel-Gebäude-Seite (sicherheitshalber) durchiterieren
-->                  |                                                                                                                               <!-- kein Semikolon
-->                     | {{#coordinates: _k_ | format=float | directional=no }}~[[_s_ _h_]];                                                        <!-- kompaktere Darstellung via float nötig bei langer location-Liste
-->                  }}                                                                                                                              <!--
-->                     |                                                                                                                            <!-- kein Semikolon
-->                | {{ifl | {{{Ehemals|}}} | | _s_ _h_,Fürth,Bayern,{{{PLZ|}}},Deutschland~[[_s_ _h_]]; }}                                          <!-- Einzel-Gebäude-Seite existiert zwar, hat aber keine Geokoordinate
-->                     }}                                                                                                                          <!--
-->                 }}                                                                                                                               <!--
-->                  | {{ifl | {{{Ehemals|}}} | | _s_ _h_,Fürth,Bayern,{{{PLZ|}}},Deutschland~[[_s_ _h_]]; }}                                       <!-- Einzel-Gebäude-Seite existiert zwar, hat aber keine Geokoordinate
-->               }}                                                                                                                                  <!--
-->                   }}                                                                                                                             <!--
-->             | {{ifl | {{{Ehemals|}}} | | _s_ _h_,Fürth,Bayern,{{{PLZ|}}},Deutschland~[[_s_ _h_]]; }}                                             <!-- wenn keine Einzel-Gebäude-Seite existiert, halt nach _s_ _h_ suchen
-->                 }}                                                                                                                               <!--
-->             }}                                                                                                                                   <!--
-->               | {{ifl | {{{Ehemals|}}} | | _s_ _h_,Fürth,Bayern,{{{PLZ|}}},Deutschland~[[_s_ _h_]]; }}                                          <!-- wenn keine Einzel-Gebäude-Seite existiert, halt nach _s_ _h_ suchen
-->           }}                                                                                                                                     <!--
-->              }}                                                                                                                                <!--
-->         |                                                                                                                                        <!-- kein Semikolon
-->            }}                                                                                                                                  <!--
-->        }}                                                                                                                                        <!--
-->          | {{#if: {{{location|}}} | | {{ifl | {{{Ehemals|}}} | | _s_ _h_,Fürth,Bayern,{{{PLZ|}}},Deutschland~[[_s_ _h_]]; }} }}                <!-- wenn Einzel-Gebäude, halt nur nach sich selbst suchen
-->      |                                                                                                                                          <!-- kein Semikolon
-->          }}                                                                                                                                    <!--
-->      }}                                                                                                                                         <!--
-->        |                                                                                                                                        <!-- kein Semikolon
-->    | {{#if: {{{lat|}}} {{{lon|}}} {{{location|}}} {{{geojson|}}} {{ifl | {{{GeoJsonKarte|}}} }} {{ifl | {{{Ehemals|}}} }}                       <!-- Seiten ohne lat/lon/location/geojson/Straße und nicht Ehemals
-->        }}                                                                                                                                      <!--
-->      || {{PAGENAME}},Fürth,Bayern,Deutschland~[[{{PAGENAME}}]];                                                                                 <!-- Suche ggf. fehlerbehaftet ohne PLZ. Pin könnte im Landkreis landen
-->      |                                                                                                                                          <!-- kein Semikolon
-->      }}                                                                                                                                         <!--
-->      }}                                                                                                                                         <!--
-->    }}                                                                                                                                           <!--
-->    | {{#if: {{{lat|}}} {{{lon|}}} {{{location|}}} {{{geojson|}}} {{ifl | {{{GeoJsonKarte|}}} }} {{ifl | {{{Ehemals|}}} }}                       <!-- Seiten ohne lat/lon/location/geojson/Straße und nicht Ehemals
-->  | geojson={{ifc | {{{geojson|}}} | {{ifl | {{{GeoJsonKarte|}}} | {{PAGENAME}} }} }}                                                             <!-- explizit wenn geojson o. GeoJsonKarte=ja
-->      || {{PAGENAME}},Fürth,Bayern,Deutschland~[[{{PAGENAME}}]];                                                                                 <!-- Suche ggf. fehlerbehaftet ohne PLZ. Pin könnte im Landkreis landen
-->  | zoom={{{zoom|18}}}                                                                                                                           <!--
-->      }}                                                                                                                                         <!--
-->  | width=                                                                                                                                       <!-- passt sich automatisch ein
-->    }}                                                                                                                                           <!--
-->  | height=                                                                                                                                       <!-- passt sich automatisch ein
-->  | geojson={{ifc | {{{geojson|}}} | {{ifl | {{{GeoJsonKarte|}}} | {{PAGENAME}} }} }}                                                           <!-- explizit wenn geojson o. GeoJsonKarte=ja
-->  | box=nein                                                                                                                                     <!-- keine eigene Box, da Teil der Faktenbox
-->  | zoom={{{zoom|18}}}                                                                                                                           <!--
-->  | form=ja                                                                                                                                       <!-- Formular-Hinweis
-->  | width=                                                                                                                                       <!-- passt sich automatisch ein
-->  | Debug={{{Debug|}}}                                                                                                                           <!--
-->  | height=                                                                                                                                     <!-- passt sich automatisch ein
-->  }}                                                                                                                                             <!--
-->  | box=nein                                                                                                                                     <!-- keine eigene Box, da Teil der Faktenbox
--> }}                                                                                                                                               <!--
-->  | form=ja                                                                                                                                     <!-- Formular-Hinweis
-->  | Debug={{{Debug|}}}                                                                                                                           <!--
-->  }}                                                                                                                                             <!--
--> }}                                                                                                                                               <!--


--></includeonly>
--></includeonly>