format of AddCatalogLayers parameters
Has anyone got the AddCatalogLayers command working? what is the format of the Command Parameter? I know it is Json but what is needed? I have tried
{
"mapservice": "_Layer_Catalog",
"id": 31,
"name": "Contours - 1m (2013)"
}
but nothing happens - no error - no log - and no contours
0
-
Hi Mike,
I don't believe it is looking for JSON, the required parameter is a comma separated string of the format -
SiteID as a word. map service ID as a number. layer display name as a word
three values separated by a period with multiple parameters separated by a comma.
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0 -
Hi Mike,
My comment would not apply if you are adding a tool, it would require JSON, as you have stated.
I haven't tested it, but can you try -
{
"_Layer_Catalog".31."Contours - 1m (2013)"
}
Regards,Wayne
0 -
There is the little warning sign that says"Warning: Invalid JSON
-- i am trying to add it to the "I Want to..." menu
Mike0 -
Hi All:
I finally figured the parameters out - 3 issues - period separator , case sensitive, space sensitive
but you can also have multiple layers added, just append with a comma. I had to republish my arcgis services with out spaces and brackets.
Here is what i finally use as the parameters - and the warning about JSON continues to show but the parameters are not in a JSON format (slight bug?) (adding 4 layers from the catalog):
_Layer_Catalog.21.Contours_-_1m_2013,_Layer_Catalog.21.Index_Contours_-_5m_2013,_Layer_Catalog.21.Index_Contours_-_25m_2013,_Layer_Catalog.21.Index_Contours_-_50m_2013
Enjoy,
Mike0 -
The parameter requirement is to not have spaces in the layer name? That sounds like an issue that should be addressed, if possible. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare