fix up rundemo, allowing compilation on osx and using expression in text_symbolizer

This commit is contained in:
Dane Springmeyer 2010-02-23 03:41:39 +00:00
parent f0fb2fa3c6
commit a2151c8e13
2 changed files with 3 additions and 1 deletions

View file

@ -33,6 +33,7 @@ source = Split(
headers = env['CPPPATH'] headers = env['CPPPATH']
boost_thread = 'boost_thread%s' % env['BOOST_APPEND'] boost_thread = 'boost_thread%s' % env['BOOST_APPEND']
boost_regex = 'boost_regex%s' % env['BOOST_APPEND']
libraries = [boost_thread,'mapnik'] libraries = [boost_thread,'mapnik']
@ -41,6 +42,7 @@ if '-DHAVE_CAIRO' in env['CXXFLAGS']:
libraries.append([lib for lib in env['LIBS'] if lib.startswith('cairo')]) libraries.append([lib for lib in env['LIBS'] if lib.startswith('cairo')])
if env['PLATFORM'] == 'Darwin': if env['PLATFORM'] == 'Darwin':
libraries.append(boost_regex)
libraries.append(env['ICU_LIB_NAME']) libraries.append(env['ICU_LIB_NAME'])
rundemo = env.Program('rundemo', source, CPPPATH=headers, LIBS=libraries) rundemo = env.Program('rundemo', source, CPPPATH=headers, LIBS=libraries)

View file

@ -162,7 +162,7 @@ int main ( int argc , char** argv)
feature_type_style popplaces_style; feature_type_style popplaces_style;
rule_type popplaces_rule; rule_type popplaces_rule;
text_symbolizer popplaces_text_symbolizer("GEONAME","DejaVu Sans Book",10,color(0,0,0)); text_symbolizer popplaces_text_symbolizer(parse_expression("GEONAME"),"DejaVu Sans Book",10,color(0,0,0));
popplaces_text_symbolizer.set_halo_fill(color(255,255,200)); popplaces_text_symbolizer.set_halo_fill(color(255,255,200));
popplaces_text_symbolizer.set_halo_radius(1); popplaces_text_symbolizer.set_halo_radius(1);
popplaces_rule.append(popplaces_text_symbolizer); popplaces_rule.append(popplaces_text_symbolizer);