revise handling of featureset returned from GetFeatureInfo 'query_map_point' - closes #271: Todo GetFeatureInfo support still depends on addressing #272

This commit is contained in:
Dane Springmeyer 2009-03-30 14:59:42 +00:00
parent 13709f4ed9
commit db7b0edd58

View file

@ -319,13 +319,15 @@ class WMSBaseServiceHandler(BaseServiceHandler):
for layerindex, layername in enumerate(params['query_layers']):
if layername in params['layers']:
if m.layers[layerindex].queryable:
features = getattr(m, querymethodname)(layerindex, params['i'], params['j'])
if features:
featureset = getattr(m, querymethodname)(layerindex, params['i'], params['j'])
if featureset:
writer.addlayer(m.layers[layerindex].name)
for feature in features:
feat = featureset.next()
while feat:
writer.addfeature()
for prop in feature.properties:
writer.addattribute(prop.key(), prop.data())
for prop in feat.properties:
writer.addattribute(prop[0], prop[1])
feat = featureset.next()
else:
raise OGCException('Requested query layer "%s" is not marked queryable.' % layername, 'LayerNotQueryable')
else: