Nächste Seite: Das Verzeichnis tiles
Aufwärts: Struktur des Beispieldatensatzes
Vorherige Seite: Struktur des Beispieldatensatzes
  Inhalt
  Index
In der Datei mapconfig.py wird die grundlegende
Konfiguration von MapIt! festgelegt. In der Sektion
The Tile Data definiert man unter
_base_dir = '../../examples/herne/' den Ort des
Verzeichnises in dem die Tiles gespeichert werden.
Die Zeile scale = 250000 gibt die Auflösungsstufe an, die als
Grundeinstellung bei jedem Auffruf der Webseite geladen wird.
Soll das Zentrum der Darstellung nicht in der Mitte der
Bilddatei liegen kann über default_x = , default_y =
ein abweichendes Darstellungszentrum definiert werden.
Die Art der Bilddateien wird in der Zeile tile_ext = '.png'
in diesem Fall auf .png - Dateien festgelegt.
#
# The Tile Data
#
# _base_dir is only used within this file
# this path points to the directory containing the data
# (tiles, markers, etc.)
_base_dir = '../../examples/herne/'
# The default scale to use
scale = 250000
# The default location to use. None means the center of the map
default_x = None
default_y = None
# data_dir is the name of the directory where the map tiles can be
# found.
tile_dir = _base_dir + '/tiles'
# The file extension of the tile files
tile_ext = '.png'
|
|
Die Sektion # Output format and size steuert die Ausgabe des
Webservers, unter anderem wird mit output_pil_format = 'JPEG'
die Python Imaging Libary (pil) angewiesen als Ausgabeformat ein .jpeg
zu erzeugen. # Default image size in pixels legt
die Größe des Kartenfensters fest das vom Webserver an den Browser
geliefert wird.
jpegJPEG (Joint Photographic Expert Group) ist ein Standard für die Darstellung und Komprimierung von Bildern.
# Output format and size
# The MIME type of the format
output_mime = 'image/jpg'
# The PIL name of the format. This is passed to a PIL Image's save
# method. Obviously the values of output_pil_format and
# output_mime have to match
output_pil_format = 'JPEG'
# The values needed for PNG output
#output_mime = 'image/png'
#output_pil_format = 'PNG'
# Default image size in pixels
image_width = 400
image_height = 400
|
|
Nächste Seite: Das Verzeichnis tiles
Aufwärts: Struktur des Beispieldatensatzes
Vorherige Seite: Struktur des Beispieldatensatzes
  Inhalt
  Index
Heiko Kehlenbrink
2002-03-03