[mapguide-users] Intersects selection layer

ehsan ehsan85 at yahoo.com
Wed Jun 17 21:35:37 EDT 2009


can you explain how can i do it..? this is my code to make the selection..

$opts = new MgFeatureQueryOptions();
$opts->SetFilter("no_lot='".$searchValue."'");//set the query filter
$featureClassName = $layer->GetFeatureClassName();
$srcId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$features2 = $featureSrvc->SelectFeatures($srcId, $featureClassName, $opts);
$selection = new MgSelection($map);
$selection->AddFeatures($layer, $features2, 0);
$selectionXml = $selection->ToXml();

Thanks
ehsan


Dave Wilson wrote:
> 
> If you use the geometry in your selection you could loop through all the
> visible layers in your map and execute a SelectFeatures spatial query
> using intersects as the spatial operation. If your intersects result
> returns at least one value in the featurereader you can add the layer to
> your list. I'm not sure how complicated it is if you have multiple
> independent objects selected. There is a union operation you could use to
> merge the selection into one large geometry, but this operation is dead
> slow.
> 
> If your selection is simply just a single feature the loop idea above is
> one approach.
> 
> Dave
> 
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of ehsan
> Sent: Wednesday, June 17, 2009 11:03 AM
> To: mapguide-users at lists.osgeo.org
> Subject: [mapguide-users] Intersects selection layer
> 
> 
> hi, i would like to know how create list of layer that intersects with the
> selection layer..?
> 
> Thanks for your help,
> ehsan
> -- 
> View this message in context:
> http://n2.nabble.com/Intersects-selection-layer-tp3094063p3094063.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Intersects-selection-layer-tp3094063p3096721.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list