Then it is difficult.
There are two ways.
1) Get the resourceID for the MapDefinition (I can't remember if it is
avalible in the viewer directly, but it should be)
Then get the MapDefinition like below, and search through the layers in
the map Xml.
This assumes that the current map has not been modified.
2) Download and parse the binary runtime layers resource tag. (Very
difficult, but is the most correct way).
If you have access to .Net on either the client or server, you can use
my .Net API to do this:
http://code.google.com/p/mapstudioos/wiki/HowToUseMapGuideAPI
Regards, Kenneth, GEOGRAF A/S
[EMAIL PROTECTED] skrev:
I have only the layer name via mapFrame.GetLayers() and I need to get the path
to the layerdefinition resource id.
Kenneth, GEOGRAF A/S wrote:
So you have the resourceId, but need the layerdefinition xml?
Look at http://localhost/mapguide/mapagent/index.html
Click "Resource", then "GetResourceContent".
Fill in the field "Resource ID" and click submit.
You can read the URL of the resulting page:
http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GETRESOURCECONTENT&VERSION=1.0.0&LOCALE=en&RESOURCEID=Library%3A%2F%2FTest%2FSources%2FWorld.FeatureSource&FORMAT=text%2Fxml
If you have a sessionID, you can append it as a parameter like:
&SESSION=...sessionid...
That will prevent it from asking about a username/password.
Alternatively add "&USERNAME=Anonymous&PASSWORD="
Regards, Kenneth, GEOGRAF A/S
[EMAIL PROTECTED] skrev:
Hi kenneth,
I need the layer definition for a layer.
Kenneth, GEOGRAF A/S wrote:
What do you have to query with?
The map definition?
The runtime map?
The layer guid?
The layer name?
The layer xml?
Regards, Kenneth, GEOGRAF A/S
alucas skrev:
Hello,
I know this is a strange question, but it's possible to get the
resource
id
from a layer through mapagent? I need to get this information without
using
the server API if it is possible.
For example: For the parcel's layer, I need to get
Library://Samples/Sheboygan/Layers/Parcels.LayerDefinition
Thanks in advance
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Quoted from:
http://www.nabble.com/getting-layerdefinition-tp17067340p17069516.html
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Quoted from:
http://www.nabble.com/getting-layerdefinition-tp17067340p17069757.html
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users