Changeset 760 for trunk/demo

Show
Ignore:
Timestamp:
11/16/08 16:36:23 (8 weeks ago)
Author:
artem
Message:

+ added python executable path
+ set Python source code encoding to utf-8
+ use UTF-8 encoded filter expression : Filter("[NOM_FR] = 'Québec'")
+ better initial bounding box

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/demo/python/rundemo.py

    r749 r760  
     1#!/usr/bin/env python 
     2# -*- coding: utf-8 -*- 
     3# 
    14# $Id$ 
    25# 
     
    97100 
    98101provpoly_rule_qc = Rule() 
    99 provpoly_rule_qc.filter = Filter("[NAME_EN] = 'Quebec'") 
     102provpoly_rule_qc.filter = Filter("[NOM_FR] = 'Québec'") 
    100103provpoly_rule_qc.symbols.append(PolygonSymbolizer(Color(217, 235, 203))) 
    101104provpoly_style.rules.append(provpoly_rule_qc) 
     
    307310# Draw map 
    308311 
    309 # Set the initial extent of the map. 
    310 print m.envelope() 
    311 m.zoom_all() 
    312 #m.zoom_to_box(Envelope(1405120.04127408,-247003.813399447,1706357.31328276,-25098.593149577)) 
     312# Set the initial extent of the map in 'master' spherical Mercator projection 
     313m.zoom_to_box(Envelope(-8024477.28459,5445190.38849,-7381388.20071,5662941.44855))  
    313314 
    314315# Render two maps, two PNGs, one JPEG.