Benutzertools

Site-Tools


Handbuch:advanced:customization:online_maps

Differenzen

Dies zeigt Ihnen die Unterschiede zwischen zwei Versionen der Seite.

Link zu dieser Vergleichsansicht

Beide Seiten vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
manual:advanced:customization:online_maps [2015/05/22 14:45] - mstupkamanual:advanced:customization:online_maps [2019/07/03 16:33] (Strom) - mstupka
Linie 2: Linie 2:
  
 ---- ----
-<WRAP todo round center 40%>Page under re-construction</WICKELN>+
 ===== Grundlegende Informationen ===== ===== Grundlegende Informationen =====
  
-  * **required version:** 1.9.5 +  * **XML file** - contains description of Online map providers (more below). Name and path to this file on storage card (or internal memory) is ///CARD_ROOT/Ort/KartenOnline/custom/<somename>.xml// (you can have more than one xml in the folder, Locus Karte will add all of them) 
-  * **XML file** - zur Verbesserung der Gesundheitsgerechtigkeit contains description of Online map providers (more below). Name and path to this file on storage card (or internal memory) is ///CARD_ROOT/Ort/KartenOnline/custom/<somename>.xml// (you can have more than one xml in the folder, Locus will add all of them) +  * **PNG images (optional)** - for every map provider name. This icon is not required! It's just displayed next to the map name in die Karte manager. Name of this icon should be   same as text in name tag.
-  * **PNG images (optional)** - for every map provider name. This icon is not required! It's just displayed next to Karten in Online manager. Name of this icon should be same as text in name tag+
  
-===== Beispiel map =====+===== Stichprobe map =====
  
-Beispiel of OpenPiste map (OSM based) created from three layers+A example of OpenPiste map (OSM based) created from three layers:
- +
-  - layer is background, which is not visible in list but required. +
-  - layer is contour layer, which is visible but not really required. On some places should not be this layer, so when server return 404 code for tile, you can still see background layer! +
-  - layer is shade. This layer will be visible is map list, so fill correct "mode" und "Bereich" (optional). This layer is also not required.+
  
 +  - background layer not visible in the map list but required.
 +  - contour layer, visible but not really required. If this layer is not visible on some places and when the server returns 404 code for missing tiles you can still see background layer.
 +  - shade layer, also not required. This layer is visible in the map list - fill correct "mode" und "Bereich" (Optional). 
 +Der dem Header hinzugefügte Referer wird in diesem Fall nicht empfohlen. 
 ==== Map code in providers.xml file ==== ==== Map code in providers.xml file ====
- 
-Example of OpenPiste map (OSM based) created from two layers here (in app is together with third shade layer). First layer is background, which is not visible in list but required. Second is contour layer, which is visible but not really required. On some places should not be this layer so when server return 404 code for tile, you can still see background layer! Referer added to header is not recommended in this case. It's only as example. 
  
 <code xml providers.xml> <code xml providers.xml>
Linie 27: Linie 24:
           <Name>OSM</Name>           <Name>OSM</Name>
           <Modus>Hintergrund</Modus>           <Modus>Hintergrund</Modus>
-          <URL>![CDATA[http://Tiles.openpistemap.org/keine Konturen/{z}/{X}/{y}.png]]></URL>+          <URL>![CDATA[http://Tiles.openpistemap.org/keine Konturen/{z}/{X}/{y}.png?v={ts}]]></URL>
           <zoomPart>{z}-8</zoomPart>           <zoomPart>{z}-8</zoomPart>
           <zoomMin>8</zoomMin>           <zoomMin>8</zoomMin>
           <zoomMax>24</zoomMax>           <zoomMax>24</zoomMax>
           <Kachelgröße>256</Kachelgröße>           <Kachelgröße>256</Kachelgröße>
 +          <TileScale dpi="0" multi="2.0" ersetzen="19" />
           <extraHeader>Referrer#http://locus.asamm.cz/</extraHeader>           <extraHeader>Referrer#http://locus.asamm.cz/</extraHeader>
        </Anbieter>        </Anbieter>
Linie 37: Linie 35:
           <Name>OSM</Name>           <Name>OSM</Name>
           <Modus>Konturen</Modus>           <Modus>Konturen</Modus>
-          <URL>![CDATA[http://Tiles.openpistemap.org/Nur Konturen/{z}/{X}/{y}.png]]></URL>+          <URL>![CDATA[http://Tiles.openpistemap.org/Nur Konturen/{z}/{X}/{y}.png?v={ts}]]></URL>
           <zoomPart>{z}-8</zoomPart>           <zoomPart>{z}-8</zoomPart>
           <zoomMin>8</zoomMin>           <zoomMin>8</zoomMin>
           <zoomMax>24</zoomMax>           <zoomMax>24</zoomMax>
           <Kachelgröße>256</Kachelgröße>           <Kachelgröße>256</Kachelgröße>
 +          <TileScale dpi="0" multi="2.0" ersetzen="19" />
           <extraHeader>Referrer#http://locus.asamm.cz/</extraHeader>           <extraHeader>Referrer#http://locus.asamm.cz/</extraHeader>
        </Anbieter>        </Anbieter>
Linie 47: Linie 46:
           <Name>OSM</Name>           <Name>OSM</Name>
           <Modus>OpenPiste</Modus>           <Modus>OpenPiste</Modus>
-          <URL>![CDATA[http://Tiles2.openpistemap.org/landschattig/{z}/{X}/{y}.png]]></URL>+          <URL>![CDATA[http://Tiles2.openpistemap.org/landschattig/{z}/{X}/{y}.png?v={ts}]]></URL>
           <zoomPart>{z}-8</zoomPart>           <zoomPart>{z}-8</zoomPart>
           <zoomMin>8</zoomMin>           <zoomMin>8</zoomMin>
           <zoomMax>24</zoomMax>           <zoomMax>24</zoomMax>
           <Kachelgröße>256</Kachelgröße>           <Kachelgröße>256</Kachelgröße>
 +          <TileScale dpi="0" multi="2.0" ersetzen="19" />
           <Länder>Welt</Länder>           <Länder>Welt</Länder>
           <Verwendung>Wandern,Skifahren</Verwendung>           <Verwendung>Wandern,Skifahren</Verwendung>
Linie 61: Linie 61:
 ==== Specifications of map definition ==== ==== Specifications of map definition ====
  
-  * **id** - required Kennung, muss sein mehr or equal 1000. Values before sind reserviert zu Ort+  * **id** - required Kennzeichnung, muss sein höher als oder gleich zu 1000 Niedrigere Werte sind reserviert für Ort Karte.
   * **type** - type of map provider   * **type** - type of map provider
     * **0** - Spherical mercator, projection Spheric, inverse Y     * **0** - Spherical mercator, projection Spheric, inverse Y
Linie 68: Linie 68:
     * **3** - Spherical mercator, projection Ellipsoid, normal Y     * **3** - Spherical mercator, projection Ellipsoid, normal Y
     * **4** - Spherical Mercator, projection Spheric, Y from center     * **4** - Spherical Mercator, projection Spheric, Y from center
-    * **5** - Spherical mercator, projection Spheric, Quadkey map system (more info http://msdn.microsoft.com/en-us /Bibliothek/bb259689.aspx)+    * **5** - Spherical mercator, projection Spheric, Quadkey map system (more info hier: http://msdn.microsoft.com/en-us /Bibliothek/bb259689.aspx)
       * use {c} for coordinate part only. There are no X, Y, Z coordinates in URL, just {c}!       * use {c} for coordinate part only. There are no X, Y, Z coordinates in URL, just {c}!
-  * **visible** - if Versorger wird sichtbar sein in der Liste +  * **visible** - visibility of Anbieter ein   Liste 
-  * **required** - is tile from this provider required? When server returns 404, use rest of multilayer map or not?+  * **required** - is tile from this provider required? When   server returns 404, use rest of multilayer map or not?
   * **background** - ID of background layer   * **background** - ID of background layer
   * **name** - name of provider   * **name** - name of provider
-  * **mode** - wenig Beschreibung+  * **mode** - kurz Beschreibung
   *del>area</del> - veraltet, wird nicht mehr verwendet   *del>area</del> - veraltet, wird nicht mehr verwendet
-  * **url** - http://tile... - base url for tiles which don''change with requests. {z}/{x}/{y} syntax for tiles, where {x} and others wird ersetzt für X, Y coordinates and Zoom +  * **url** - http://tile... - base url for tiles dass nicht change with requests. {z}/{x}/{y} syntax for tiles, where {x} and others ersetzen X, Y coordinates and Zoom 
-    * **{x}** - ersetzen durch X tile +    * **{x}** - ersetzt   X tile 
-    * **{y}** - ersetzen durch Y-Kachel +    * **{y}** - ersetzt   Y-Kachel 
-    * **{z}** - ersetzen durch zoom level after angewandt **zoomPart** computation +    * **{z}** - ersetzt  zoom level after **zoomPart** computation wird angewandt 
-    * **{s}** (optional) - ersetzen durch server text +    * **{ts}** – TileScale ersetzt den Wert 
-  * **serverPart** - you can define {s} item in main url. In serverPart can then be defined Reihe von Elementen das wird zufällig als {s}-Element festgelegt. Also zum BeispielserverPart>0;1;2</serverPart> und URL begann alsURL>![CDATA[http://Tiles{s}.open ..... {z}/{X}/{y}.png]]></URL> stellt jeden Anruf zufällig auf http:// einTiles0.open..., oder http://Tiles1.open..., oder http://Tiles2.open... +    * **{s}** (optional) - ersetzt die server text 
-  * **zoomPart** - {z}-8 - syntax for neu berechnen correct zoom value for request. This value is usually Zoom - minimum zoom, but sollte Sei anders+  * **serverPart** - {s} item kann definiert werden in   main url. In serverPart an array of items kann dann definiert werden  das wird zufällig als {s}-Element festgelegt. Also zum BeispielserverPart>0;1;2</serverPart> und URL begann alsURL>![CDATA[http://Tiles{s}.open ..... {z}/{X}/{y}.png]]></URL> stellt jeden Anruf zufällig auf http:// einTiles0.open..., oder http://Tiles1.open..., oder http://Tiles2.open...\\ **ServerPart**-Parameter können auch durch //x, y// und Parameter in einer einfachen mathematischen Formel definiert werden:\\Code> <serverPart>({x}+{y})%4</serverPart></Code> 
 +  * **zoomPart** - {z}-8 - syntax for recomputing correct zoom value for   request. This value is usually Zoom - minimum zoom, but kann Sei anders
   * **zoomMin** – minimaler Zoom   * **zoomMin** – minimaler Zoom
   * **zoomMax** – maximaler Zoom   * **zoomMax** – maximaler Zoom
-  * **tileSize** - size of tiles in Pixel +  * **tileSize** - size of tiles in Pixel 
-  * **countries** - list of countries (separated by Komma), Wobei Karte könnte genutzt werden. Diese Werte werden zum Trennen von Karten in „Online map tab"+  * **tileScale** – definiert den Skalierungsfaktor (multi) auf 2x, die anzuwendende DPI (dpi, 0 = alle Geräte) und den Wert, der in der URL ersetzt wird (//ersetzen//, darf nicht leer sein) 
-  * **usage** - list of possible Verwendung of this map (separated by Komma). Aktuell Möglichkeiten are: //aero, city, cycle, hiking, nautical, overlay, photo, road, ski, transport//. Diese Werte werden zum Trennen von Karten in „Online map tab"+  * **countries** - list of countries (separated by Kommasrelevant for the map. These values are used for separating maps in "Online map tab"
-  * **extraHeader** - extra Http request that wird sein added to tile request on server. These additional data consist of two parts with syntax part1#part2. Part1 is name of this request, Part2 is value of this request. Also this TAG should be in XML for every provider more dann Einmal. +  * **usage** - list of possible Nutzungen of this map (separated by Kommas). Aktuell Optionen are: //aero, city, cycle, hiking, nautical, overlay, photo, road, ski, transport//. Diese Werte werden zum Trennen von Karten in „Online map tab"
-  * **attribution** - klein text displayed at map screen am Boden. Please use this when you're using maps that have any owner (other then yours) and require attribution in their terms of use+  * **extraHeader** - extra Http request that is hinzugefügt zu   tile request on server. These additional data consist of two parts with syntax part1#part2. Part1 is die Anfrage name, Part2 is die Anfrage value. Also this TAG should be in XML for every provider more als Einmal. 
 +  * **attribution** - kurz text displayed at der Boden von map screen. Please use this when you're using urheberrechtlich geschützt maps that require attribution in their terms of use.
  
-ZoomValues (zoomMin, zoomMax) have to be counted as valid zoom level by 2^x. So whole world have one tile 256x256 px, which means 2^8, so X = 8!. That's why almost all maps in Locus start with zoomMin = 8 but have zoomPart {z} - 8. This is because in URL, zooms usually beginnt von 0 some max value+ZoomValues (zoomMin, zoomMax) have to be counted as valid zoom level by 2^x. So   ganze World has one tile 256x256 px, which means 2^8, so X = 8!. That's why almost all maps in Locus start with zoomMin = 8 but have zoomPart {z} - 8. This is because in URLs zooms usually Anfang von 0 zu some max value.
  
-I'm sure that this solution should be improved so if you have any ideas, tell me. Ebenfalls if here will be any little bit experienced developer on android, we sollte versuchen einige zu erstellen Mechanist for adding external providers through ContentProviders or services.+Dieser solution should be improved so if you have any ideas, tell us. Ebenfalls, ein erfahrensten  Android developer on should in der Lage sein einige zu erstellen Mechanismus for adding external providers through ContentProviders or services.
  
-Now you know syntax of providersso you should add your custom ones. Please, share links with others and enjoy+Now you know syntax of providers so you should add your custom ones. Please, share links with others and enjoy!
  
 ==== Hints ==== ==== Hints ====
  
-  * providers with same name will be grouped together! +  * providers with   same name will be grouped together 
-  * if you add PNG icon into custom directory with same name as provider name, am linken Bildschirmrand. wird angehängt in online map screen+  * if you add PNG icon into custom directory with   same name as provider name, it wird angehängt zu online map screen
  
 ===== How to obtain required info ===== ===== How to obtain required info =====
  
-Suggested is to use Firefox browser with extension HttpFox+Wir empfehlen to use Firefox browser with extension HttpFox:
  
-  * Start Firefox browser and open webpage with map. Nice example on http://www.openstreetmap.org/.+  * Start Firefox browser and open webpage with map. Nice example is http://www.openstreetmap.org/.
   * Open HttpFox from Tools menu or by SHIFT-F2. And press top green Start button.   * Open HttpFox from Tools menu or by SHIFT-F2. And press top green Start button.
-  * Now zoom by one level and you'll see list of requests on map server. Nämlich Screenshot unten. +  * Now zoom by one level and you'll see   list of requests on   map server. See Screenshot unten. 
-  * So I'll take selected URL line. On right side is required URLso when we separate part with coordinates then 12/2215 /1389 will be cooPart written as {z}/{X}/{y}. +  * Ausgewählte URL-Zeile übernehmen. Erforderlich URL Es ist rechts so when we separate part with coordinates then 12/2215 /1389 will be cooPart written as {z}/{X}/{y}. 
-  * Rest will be url partso it will look http://c.tile.openstreetmap.org/{c}.png. +  * the rest is url part so it will look Gefällt mir http://c.tile.openstreetmap.org/{c}.png. 
-  * These are main values needed to add map. Tilesize is usually 256px. Min and max zoom values have to be tested manually. Also zoomPart is usually z-8, which bedeuten that zoom 20 in Locus will be served as 12 in request on server.+  * These are main values needed to add map. Tilesize is usually 256 px. Min and max zoom values have to be tested manually. Also zoomPart is usually z-8, which Mittel that zoom 20 in Locus will be served as 12 in request on server.
  
 {{ :Handbuch:fortschrittlich:Anpassung:osm_requests.png?nolink |}} {{ :Handbuch:fortschrittlich:Anpassung:osm_requests.png?nolink |}}
 +
 +Ein weiteres Beispiel für eine benutzerdefinierte Online-Karte kann die Strava Global Heatmap XML-Datei sein, die wir gemeinsam mit unseren Benutzern erstellt haben. Es enthält Rad- und Laufebenen und kann heruntergeladen werden {{:Handbuch:fortschrittlich:Anpassung:strava2.providers.zip|hier >>}}. Entpacken Sie es einfach in Locus/KartenOnline/Benutzerdefiniertes Verzeichnis und viel Spaß! 
 +</WICKELN>
 +===== Eigener Open Map Tile Server =====
 +==== Deaktivierung des Karten-Download-Limits ====
 +Wenn Sie Ihren eigenen Kartenkachelserver betreiben, müssen Sie möglicherweise das in Locus standardmäßig festgelegte **Limit zum Herunterladen von Kacheln aufheben**, um einen angemessenen Download-Verkehr pro Anwendung aufrechtzuerhalten:
 +  - **Mod_headers aktivieren**: sudo a2enmod-Header
 +  - **Bearbeiten Sie die Apache-Konfigurationsdatei** (/usw/Apache2/apache2.conf) und fügen Sie am Ende hinzu: Header set locus_disable_download_limit "WAHR"
manual/advanced/customization/online_maps.1432298717.txt.gz · Letzte Änderung: 2015 05:22 (externe Bearbeitung)