Also, you may need to double check that you're correctly using the MgMap API as a result of http://trac.osgeo.org/mapguide/wiki/MapGuideRfc9
- Jackie Jamo wrote: > > Cheers Jackie I've fixed it up changed the MgSelection to MgSelectionBase > where needed. > > Also changed the > MgSelection thisSel = new MgSelection() to MgSelectionBase thisSel = new > MgSelectionBase(map); which i think has fixed up the issue > > Another issue thats got me stunned is this doesn't work...... > foreach (MgLayerBase cLayer in cadFeatures.GetLayers()) > { > Response.Write(cLayer.GetClassDefinition().GetProperties().Count); > } > However at the same point in code this does? > > string layerClassName = cLayer.GetFeatureClassName(); > string selectionString = cadFeatures.GenerateFilter(cLayer, > layerClassName); > string layerFeatureId = cLayer.GetFeatureSourceId(); > MgResourceIdentifier layerFeatureResource = new > MgResourceIdentifier(layerFeatureId); > MgFeatureQueryOptions queryOptions = new MgFeatureQueryOptions(); > queryOptions.SetFilter(selectionString); > MgFeatureReader featureReader = > FeatureService.SelectFeatures(layerFeatureResource, layerClassName, > queryOptions); > > Response.Write(featureReader.GetClassDefinition().GetProperties().Count); > > I'm not too sure on why or how but I'm not too fussed unless this extra > creation of a MgSelection Set will cause twice as much waiting.... > > > > Jackie Ng wrote: >> >> Perhaps you may have used the wrong MgSelection constructor? The API docs >> says that MgSelection() is a dummy constructor. >> >> - Jackie >> > > -- View this message in context: http://n2.nabble.com/Trying-to-create-an-ajax-search-thingo-tp2729762p2730027.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users