[Mapguide-trac] [mapguide-trac] #2459: v2.6 QUERYMAPFEATURES may produce inconsistent results

MapGuide Open Source trac_mapguide at osgeo.org
Tue Jun 24 20:33:25 PDT 2014


#2459: v2.6 QUERYMAPFEATURES may produce inconsistent results
-------------------------------+--------------------------------------------
 Reporter:  jng                |         Owner:  jng   
     Type:  defect             |        Status:  closed
 Priority:  high               |     Milestone:  2.6   
Component:  Rendering Service  |       Version:        
 Severity:  critical           |    Resolution:  fixed 
 Keywords:                     |   External_id:        
-------------------------------+--------------------------------------------
Changes (by jng):

  * priority:  low => high
  * severity:  trivial => critical


Old description:

> The v2.6 QUERYMAPFEATURES works like this:
>
>  1. Call MgRenderingService::QueryFeatures() with the given parameters
> (returns a MgFeatureInformation)
>  2. Call MgRenderingService::RenderDynamicOverlay() with the given
> parameters (if inline selection is requested)
>  3. Call MgRenderingService::QueryFeatureProperties() with the given
> parameters (if attributes is selected)
>
> All 3 components are then married up to form the final response.
>
> A click-based selection will issue QUERYMAPFEATURES with MAXFEATURES=1.
> For a map with more than 1 selectable layer (eg. Parcels, Trees), there
> may be cases where the following happens.
>
>  1. Call MgRenderingService::QueryFeatures() with the given parameters.
> Returns a MgSelection with Parcels selected.
>  2. Call MgRenderingService::RenderDynamicOverlay() with the given
> parameters. Returns an image of the selected parcel
>  3. Call MgRenderingService::QueryFeatureProperties() with the given
> parameters. Returns the attributes of the first selected '''Tree'''.
> Because MAXFEATURES=1, no attributes for Parcels are returned.
>
> The problem is when a click could select more than one layer, the
> attributes may be collected for the wrong layer, even if that layer has
> candidate matching features. When MAXFEATURES=1 and we requested
> LAYERNAMES=Trees,Parcels and a selection image/XML of Parcels is
> returned, at this point we only want to collect attributes from Parcels
> instead of '''Trees and Parcels'''.
>
> Basically when we have a MgFeatureInformation, we want to use the layer
> names within its MgSelection for collecting the matching attributes
> instead of using the layer names from the original request.

New description:

 The v2.6 QUERYMAPFEATURES works like this:

  1. Call MgRenderingService::QueryFeatures() with the given parameters
 (returns a MgFeatureInformation)
  2. Call MgRenderingService::RenderDynamicOverlay() with the given
 parameters (if inline selection is requested)
  3. Call MgRenderingService::QueryFeatureProperties() with the given
 parameters (if attributes is selected)

 All 3 components are then married up to form the final response.

 A click-based selection will issue QUERYMAPFEATURES with MAXFEATURES=1.
 For a map with more than 1 selectable layer (eg. Parcels, Trees), there
 may be cases where the following happens.

  1. Call MgRenderingService::QueryFeatures() with the given parameters.
 Returns a MgSelection with Parcels selected.
  2. Call MgRenderingService::RenderDynamicOverlay() with the given
 parameters. Returns an image of the selected parcel
  3. Call MgRenderingService::QueryFeatureProperties() with the given
 parameters. Returns the attributes of the first selected '''Tree'''.
 Because MAXFEATURES=1, no attributes for Parcels are returned.

 The problem is when a click could select more than one layer, the
 attributes may be collected for the wrong layer, even if that layer has
 candidate matching features. When MAXFEATURES=1 and we requested
 LAYERNAMES=Trees,Parcels and a selection image/XML of Parcels is returned,
 at this point we only want to collect attributes from Parcels instead of
 '''Trees and Parcels'''.

 Basically when we have a MgFeatureInformation, we should use its
 MgSelection to drive the whole attribute collection process instead of
 reissuing the same request parameters to QueryFeatureProperties() and
 hoping its set of attributes will match up with the rest of the response.

--

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/2459#comment:2>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list