Selection Tolerance in QUERYMAPFEATURES

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Selection Tolerance in QUERYMAPFEATURES

GordonL
Hi All,
is there a way to increase the selection tolerance in the QUERYMAPFEATURES request?

I want the user to pick an object, and the following shows the selected feature even though the object is much larger on the screen:



You can notice the small blue "selection" at the center of the icon.  This actually represents the tolerance for the user to select too.  If they try to select outside of the blue area, they miss the feature.

Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

GordonL
Here is a better example: at various scales...notice how the selection blue box varies compared to the symbol.  I would like to have the selection circumscribe the symbol.

1:20K


1:10K


1:2K


1:500
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

Berg, James
Can you tell us more about the symbol and how it was created? What kind of resource is it?
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

Jackie Ng
In reply to this post by GordonL
Is this happening with the 2.6 RC1 release? We'll probably need some test/sample data.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

GordonL
WEIRD_POINTS.mgp

Sure here is the MGP with the map/layer/data and Symbol Library.

Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

GordonL
Also, I have noticed below a particular scale, I cannot select the feature with a pick (MG 2.6 Release Candidate 1) only with a window select.

See Animated GIF Attached

Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

Jackie Ng
I'm finding that selection matches the size of the symbol.

I can see the need to window select these features at lower levels, but I don't know if this is an actual issue.

Point selections are always inflated by a small "pixel buffer" so the query geometry is always a polygon, but this buffer is always a constant *screen space* value meaning clicks on points have better chance of registering at higher scales than ones at lower scales.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

GordonL
HI Jackie,
I am not sure if it is related, but when I select the features with the QUERYMAPFEATURES and use the REQUESTDATA of 3, I get an 559 MgNullReferenceException - "4" is fine, but no attributes.

Gordon
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

Jackie Ng
When REQUESTDATA = 3, it means you OR-ed in (2 = Inline Selection image).

In that case, you also have to pass in a SELECTIONCOLOR and SELECTIONFORMAT or else the operation won't know how to render the inline selection because you didn't specify the color/format of the selection.

I'm wondering if we should just throw an error or just default to blue/png if these parameters are not specified to make this more clearer.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

GordonL
Also, it would be cool if you could pass a TEXTFORMAT=JSON/XML/TXT for the selection.
(i.e. REQUESTDATA=1&TEXTFORMAT=JSON)

 
That way we don't need to convert the XML to JSON etc.
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

Jackie Ng
All (?) mapagent operations have JSON equivalents if you pass in FORMAT=application/json

Mind you this is XML-to-JSON kind of JSON (where nearly every XML element turns out as a JSON array), but JSON nonetheless.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Selection Tolerance in QUERYMAPFEATURES

GordonL
Erm.  I was converting manually. Thanks.