Try this J

 

MgSelection selection = new MgSelection(map);

      selection.Open(resourceService, "1"); //opens selection

 

      MgReadOnlyLayerCollection layers = selection.GetLayers(); //gets
layers from selection 

      MgLayerCollection zdenci = map.GetLayers();

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim O'Leary
Sent: Sunday, January 06, 2008 10:51 PM
To: [email protected]
Subject: RE: [mapguide-users] Get selected layers from server side

 

 

I know there is always a way to submit a form via POST, but it can be an

unwieldy proces. I am interested to know if the MapGuide server can
supply a

list of selected layers to a server-side program.

 

 

 

Kori Maleski-4 wrote:

> 

> I think this isn't possible when using the Ajax viewer, but is
possible

> when

> using the DWF viewer.

> 

> Someone may correct me on that...

> 

> Use the Script frame of the Ajax viewer to fire a Form Submit Post to
pass

> your selection set instead.

> 

> 

> Cheers,

> 

> Kori Maleski

> 

> -----Original Message-----

> From: [EMAIL PROTECTED]

> [mailto:[EMAIL PROTECTED] On Behalf Of Jim
O'Leary

> Sent: January-04-08 6:13 PM

> To: [email protected]

> Subject: [mapguide-users] Get selected layers from server side

> 

> 

> Is it possible to get a list of the map's selected layers from the
server

> side? 

> 

> I know I can get this by making an MgSelection and passing the
selection

> XML

> from the client to the server program, like:

> 

> $selection = new MgSelection($map,$_REQUEST['selectionXML']);

> 

> However, I don't want to pass a big selection XML string to the server

> program, as I am passing by GET and the selection XML could be greater

> than

> the browser handles. 

> 

> If I make the selection object without including the selection XML,
like

> 

> $selection = new MgSelection($map);

> $selectedLayers = $selection->GetLayers();

> $numberLayers = $selectedLayers->GetCount();

> 

> PHP tells me that $selectedLayers is not an object.

> 

> Thanks.

> 

> 

> -- 

> View this message in context:

>
http://www.nabble.com/Get-selected-layers-from-server-side-tp14628979s16
610p

> 14628979.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

> 

> 

 

-- 

View this message in context:
http://www.nabble.com/Get-selected-layers-from-server-side-tp14628979s16
610p14654216.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

Reply via email to