From b352e9143207852dfc5e3abf032010a496160aec Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Sun, 16 Nov 2008 21:36:23 +0000 Subject: [PATCH] =?UTF-8?q?+=20added=20python=20executable=20path=20+=20se?= =?UTF-8?q?t=20Python=20source=20code=20encoding=20to=20utf-8=20+=20use=20?= =?UTF-8?q?UTF-8=20encoded=20filter=20expression=20:=20Filter("[NOM=5FFR]?= =?UTF-8?q?=20=3D=20'Qu=C3=A9bec'")=20+=20better=20initial=20bounding=20bo?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/python/rundemo.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/demo/python/rundemo.py b/demo/python/rundemo.py index 6b504d9af..32338f7d8 100644 --- a/demo/python/rundemo.py +++ b/demo/python/rundemo.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# # $Id$ # # This file is part of Mapnik (c++ mapping toolkit) @@ -96,7 +99,7 @@ provpoly_rule_on.symbols.append(PolygonSymbolizer(Color(250, 190, 183))) provpoly_style.rules.append(provpoly_rule_on) provpoly_rule_qc = Rule() -provpoly_rule_qc.filter = Filter("[NAME_EN] = 'Quebec'") +provpoly_rule_qc.filter = Filter("[NOM_FR] = 'Québec'") provpoly_rule_qc.symbols.append(PolygonSymbolizer(Color(217, 235, 203))) provpoly_style.rules.append(provpoly_rule_qc) @@ -306,10 +309,8 @@ m.layers.append(popplaces_lyr) # Draw map -# Set the initial extent of the map. -print m.envelope() -m.zoom_all() -#m.zoom_to_box(Envelope(1405120.04127408,-247003.813399447,1706357.31328276,-25098.593149577)) +# Set the initial extent of the map in 'master' spherical Mercator projection +m.zoom_to_box(Envelope(-8024477.28459,5445190.38849,-7381388.20071,5662941.44855)) # Render two maps, two PNGs, one JPEG. im = Image(m.width,m.height)