What about zooming to the feature using the maps Zoom to selection method: ExecuteMapAction(10);
Does the map zoom to the correct feature? Is it highlighted afterwards? -Mark P. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of clarkie342 Sent: Monday, January 12, 2009 11:33 AM To: [email protected] Subject: RE: [mapguide-users] Problems with selection Is there a solution to the initial issue here? I came across the same thing but I do not have any joins in the feature source. Here is the javascript that I have to update the selection. var selectionXml = document.getElementById("ctl00_ContentPlaceHolder1_hfSelectXml").getAttr ibute("value"); var mapFrame = document.getElementById("viewerFrame").contentWindow.GetMapFrame(); mapFrame.SetSelectionXML(selectionXml); mapFrame.Refresh(); the status bar shows 1 feature selected but no feature is highlighted. I also tried manual refresh of the map(from context menu) that did not highlight the selected features either. Appreciate any help. Thanks. Andy Morsell wrote: > > Yes, it does say that a feature is selected. Technically, it still is > since > the selection object exists on the server and is not disposed of when you > turn the layer off. This is most likely by design and I find it would > probably be more desirable than not to have that selection object reappear > when the layer is turned back on if it was the last thing I had selected. > If you want to clear the selection, even when the layer is turned off, you > can use the Clear Selection through the interface or programmatically. > > > Andy > > > _____ > > From: Butler, Juan P [mailto:[email protected]] > Sent: Thursday, April 20, 2006 11:05 AM > To: [email protected] > Subject: RE: [mapguide-users] Problems with selection > > > Thanks Andy. > > Check to see on the status bar if it states that an object is selected > when > the layer is turned off. My highlight goes away, but the map still has an > object selected. > > - Juan > > _____ > > From: Andy Morsell [mailto:[email protected]] > Sent: Thu 4/20/2006 1:16 PM > To: [email protected] > Subject: RE: [mapguide-users] Problems with selection > > > I am seeing the same thing in regards to the joined feature (polygons > joined > to Access) not highlighting when selected but the attributes do show up in > the Properties pane. I am also seeing some general weirdness with this > layer. If I turn it off in the legend, it does not turn off on the map (a > request to the server does not occur) until I select an object. Panning > and > zooming aren't forcing the refresh. I suspect these are related issues > and > the refresh flag is getting stuck when interacting with these types of > layers. > > I don't see the same thing as you in the second case. If I select an > object > and it highlights and then turn off that layer, the highlight turns off as > well. When that layer is turned back on, the highlight also reappears. > > > Andy Morsell, P.E. > Spatial Integrators, Inc. > http://www.SpatialGIS.com > > > > > _____ > > From: Butler, Juan P [mailto:[email protected]] > Sent: Thursday, April 20, 2006 9:36 AM > To: [email protected] > Subject: RE: [mapguide-users] Problems with selection > > > > Some more observations... > > It seems that when I select my parcel layer that is tied to my Access > database, the highlight feature doesn't work. When I switch over to use > just the layer that is based strictly on the sdf file, the highlighting > works. So I guess it has something to do with layers that are tied to an > Access database. Can someone else please try this and let me know if they > are seeing this? > > Also, when I select a feature and then turn of the layer of the selected > feature, the feature seems to still be selected. Odd. > > FYI: I'm using the AJAXViewer > > - Juan > > _____ > > From: Butler, Juan P > Sent: Thu 4/20/2006 12:05 PM > To: [email protected] > Subject: [mapguide-users] Problems with selection > > > Has anyone experienced problems with features not highlighting after > selection? The data appears in the Properties frame, but the feature > isn't > highlighted. Plus, the bottom of the map states 1 feature selected. It's > only on my parcel polygon layer. My other polygon layers select and > highlight fine. Weird. > > Another thing I noticed was when I had a feature selected from this layer, > if I go to zoom out or pan, the map locks up and does nothing unless I > unselect the feature. > > - Juan > > -- View this message in context: http://n2.nabble.com/Problems-with-selection-tp1804059p2147489.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
