[mapguide-users] Problems with selection

clarkie342 f2000342 at gmail.com
Thu Jan 15 16:14:07 EST 2009


This selection is trigger from my grid control event so I could not put the
script in OnLoad(). All my non-mapguide stuff works with
RegisterClientScriptBlock so not sure whats up with this. 



Mark Pendergraft wrote:
> 
> Yeah, I've always had issues with the RegisterClientScriptBlock in my
> pages so I've always just added a "onLoad()" javascript function to the
> body of my aspx page and then run my script from there.
> -Mark
> 
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of clarkie342
> Sent: Thursday, January 15, 2009 10:56 AM
> To: mapguide-users at lists.osgeo.org
> Subject: RE: [mapguide-users] Problems with selection
> 
> 
> I was using RegisterClientScriptBlock in code-behind to set the
> selectionxml
> to the mapframe. This was not working so I changed my logic to do
> clientcallback so now I am setting the selectionxml in the aspx page
> itself.
> this seems to work. 
> 
> Not sure why the difference. sorry did not get a chance to test the
> below
> scenerio.
> Thanks for the response. 
> 
> 
> Mark Pendergraft wrote:
>> 
>> 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: mapguide-users-bounces at lists.osgeo.org
>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of
> clarkie342
>> Sent: Monday, January 12, 2009 11:33 AM
>> To: mapguide-users at lists.osgeo.org
>> 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:jpbutler at co.pinellas.fl.us] 
>>> Sent: Thursday, April 20, 2006 11:05 AM
>>> To: users at mapguide.osgeo.org
>>> 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:amorsell at spatialgis.com]
>>> Sent: Thu 4/20/2006 1:16 PM
>>> To: users at mapguide.osgeo.org
>>> 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:jpbutler at co.pinellas.fl.us] 
>>> Sent: Thursday, April 20, 2006 9:36 AM
>>> To: users at mapguide.osgeo.org
>>> 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: users at mapguide.osgeo.org
>>> 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
>> 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/Problems-with-selection-tp1804059p2164233.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/Problems-with-selection-tp1804059p2164945.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list