artemp/trac2github — Issue #644: query_map_point prevents further usage of map object
Author: artemp
Created: 2011-10-09 20:45:10+00:00
State: open
Labels: Agg_Renderer

This problem just started popping up, oddly enough, on a mapserver that both renders points and uses query_map_point to determine tile coordinates. After a call to query_map_point on a layer that does exist, the map object renders entirely blank tiles. Without calling query_map_point or calling it on a layer that doesn't exist, the tiles can still be rendered correctly.

A basic test case:

{{{

import mapnik2 as mapnik

m = mapnik.Map(500,500)

mapnik.load_map(m, 'style.xml')

m.zoom_all()

# First image renders
mapnik.render_to_file(m, 'test.png')

# There is no layer 1, this returns none
fs = m.query_map_point(1, 0, 0)

# Second image renders
mapnik.render_to_file(m, 'test_1.png')

# There is a layer 0, this returns a featureset
fs = m.query_map_point(0, 0, 0)

# Third image blank
mapnik.render_to_file(m, 'test_2.png')
}}}