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:
parent
13709f4ed9
commit
db7b0edd58
1 changed files with 7 additions and 5 deletions
|
@ -319,13 +319,15 @@ class WMSBaseServiceHandler(BaseServiceHandler):
|
||||||
for layerindex, layername in enumerate(params['query_layers']):
|
for layerindex, layername in enumerate(params['query_layers']):
|
||||||
if layername in params['layers']:
|
if layername in params['layers']:
|
||||||
if m.layers[layerindex].queryable:
|
if m.layers[layerindex].queryable:
|
||||||
features = getattr(m, querymethodname)(layerindex, params['i'], params['j'])
|
featureset = getattr(m, querymethodname)(layerindex, params['i'], params['j'])
|
||||||
if features:
|
if featureset:
|
||||||
writer.addlayer(m.layers[layerindex].name)
|
writer.addlayer(m.layers[layerindex].name)
|
||||||
for feature in features:
|
feat = featureset.next()
|
||||||
|
while feat:
|
||||||
writer.addfeature()
|
writer.addfeature()
|
||||||
for prop in feature.properties:
|
for prop in feat.properties:
|
||||||
writer.addattribute(prop.key(), prop.data())
|
writer.addattribute(prop[0], prop[1])
|
||||||
|
feat = featureset.next()
|
||||||
else:
|
else:
|
||||||
raise OGCException('Requested query layer "%s" is not marked queryable.' % layername, 'LayerNotQueryable')
|
raise OGCException('Requested query layer "%s" is not marked queryable.' % layername, 'LayerNotQueryable')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue