コード例 #1
0
"""
A tile source that serves pre-generated GMT tiles from the local filesystem.
"""

import os
import pickle
import pySlipQt.tiles as tiles
import pyslip.log as log

try:
    log = log.Log('pyslipqt.log')
except AttributeError:
    # means log already set up
    pass

###############################################################################
# Change values below here to configure the GMT local tile source.
###############################################################################

# attributes used for tileset introspection
# names must be unique amongst tile modules
TilesetName = 'GMT local tiles'
TilesetShortName = 'GMT tiles'
TilesetVersion = '1.0'

# the pool of tile servers used
TileServers = None

# the path on the server to a tile
# {} params are Z=level, X=column, Y=row, origin at map top-left
TileURLPath = None
コード例 #2
0
ファイル: test_gotoposition.py プロジェクト: fivitti/pySlip
map-relative marker would be drawn at that position.  At the same time, a
view-relative marker would be drawn at the centre of the view.  The difference
between the two markers shows errors in the Geo2Tile() & Tile2GEO() functions.
"""

import os
import sys
import wx
import pyslip
import pyslip.stamen_watercolor as tiles
#import pyslip.gmt_local as tiles
import pyslip.log as log
from appstaticbox import AppStaticBox
from rotextctrl import ROTextCtrl
try:
    log = log.Log('pyslip.log')
except AttributeError:
    # already set up, ignore error
    pass

######
# Various demo constants
######

# demo name/version
DemoVersion = '1.1'
DemoName = "pySlip %s - GotoPosition() test %s" % (pyslip.__version__,
                                                   DemoVersion)

# initial level and position
InitViewLevel = 3
コード例 #3
0
"""
Test if we can have a list of "allowable levels" and if a user requests
the display of a level not in that list we CANCEL the zoom operation.

Usage: test_displayable_levels.py [-d] [-h] [-t (OSM|GMT)]
"""

import sys
import wx
import pyslip

# initialize the logging system
import pyslip.log as log
try:
    log = log.Log("pyslip.log")
except AttributeError:
    # already set up, ignore exception
    pass

######
# Various constants
######

DemoName = 'pySlip %s - Zoom undo test' % pyslip.__version__
DemoWidth = 1000
DemoHeight = 800
DemoAppSize = (DemoWidth, DemoHeight)

InitViewLevel = 2
InitViewPosition = (100.494167, 13.7525)  # Bangkok