[mapguide-users] Selections and Highlighting (Open Source Coders specifically)

Paul Spencer pspencer at dmsolutions.ca
Tue Jan 16 20:03:11 EST 2007


Scott,

If you are prepared to write some code against the scripting API, it  
is relatively easy to select features by querying the underlying  
feature source directly.  When querying a feature source, the  
corresponding layer does not have to be visible nor does it have to  
be in scale.  In fact, it doesn't have to be in the current map  
definition at all ... or even have a corresponding layer definition :)

The AJAX Viewer allows you to build custom controls that interact  
with a point on the map ... look at the digitizing examples.

Once you have the point, you can send it to your server-side script  
and use it to query any feature source.

One thing this won't do, though, is create the visual selection if  
the user does zoom in.  To accomplish this, you'd need to do some  
funky stuff I guess.

Cheers

Paul

On 16-Jan-07, at 2:28 PM, Scott Hameister wrote:

> I’ve painfully found out through many trials that the  
> RenderingService.QueryFeatures object in Mapguide API only allows  
> you to select Map Features that are Selectable at current Scale.
>
> And that the object Highlights only Show if the Object is Currently  
> Turned On.
>
> (Making things worse This is the Only Java Class that Bombs in  
> Coldfusion, it works flawlessy when No objects can be selected and  
> returns a blank Schema, but if something can be it Crashes)
>
>
>
> I understand the coding for this and the reasons….for 90% of  
> Applications
>
>
>
> However We Have several that are used to being able to see  
> selections in ArcIMS of Objects that are not Available at the  
> current Scale or turned on in our Application.
>
> We would really like to move many of them over to Mapguide Since  
> they would prefer it.
>
>
>
> Example: Searching for 80+ acre parcels through an entire County  
> from a county wide view…or finding soils underneath an object  
> without having to turn the themed soils layer on etc.
>
>                         I would really like to talk with someone  
> about the source code and if this can be accomplished.  The Pin  
> Thing is not what we’re after.
>
>
>
> I’ve managed to go down the Feature Source Path…and Got to this  
> Point : MgGeometryFactory.CreateMultiGeometry 
> (MgGeometryCollection) : Which is a collection of Objects under the  
> Selection Geometry of Objects on their Layer filter…i.e. on  
> ParcelCounty1Layer and ParcelCounty2 Layer
>
> Now I could try to convert this into a Layer and select it, or  
> theme the layer to look like a selection…but it sort of defeats  
> allot of the other well coded stuff already in the product.
>
>
>
> I sort of wish there were a flag in the  
> RenderingService.QueryFeatures for True-Allowing Selections On  
> objects not available by scale False-The OldWay or vice versa
>
> And a flag in the Map Renderer that tells it where to place the  
> Selection Highlight T-Independent of the Layer the Selection is On 
> (maybe even creating a layer called selection) or F-Tied to the  
> Layer so if The layer is off, the selection doesn’t show (The  
> current Method)…
>
> …Is this even Plausible? If So it could be just an optional Flag  
> with the default set to the old way of doing things so no Apple  
> Carts are upset….I can give Dozens of real world examples for why  
> this would be a Valid Project to tackle…Unfortunately I don’t Code  
> in C, I’m really just a web programmer and get Lost in the Open  
> Source Root code, or I’d try this myself….but that also wouldn’t  
> make it a part of the permanent API either.
>
>
>
> Can anyone tell me if this is possible or show me a way to emulate  
> this in any code?
>
>
>
> If You want to call me to get a better description or see a live  
> example of what I’m trying to do we can webex…just email me and let  
> me know…I could really use the help…or at least to be told If it  
> just can’t be done in the API or by me using the existing API.
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users

+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+






More information about the mapguide-users mailing list