Adding additional map service to  be called from the configuration file (config.xml)

2265
6
01-09-2012 08:31 PM
origudes
Deactivated User
Hi,

Is there any way to assign / add more than one map service from the config.xml file?

For example, this is current map service code i have at the moment in my application:

<operationallayers>
            <layer label="LBHC" type="dynamic" visible="true"
                   url="http://gis03.rcs.griffith.edu.au/ArcGIS/rest/services/HDSS/MapServer"/>
           </operationallayers>  

And i would like to add another map service to be assigned from the config.xml file, can any one share an example how this could be done?

I know how to create a new map service for my new data, just don't know how to configure it in the config file.

Thanks..
Tags (2)
0 Kudos
6 Replies
AlexeyTereshenkov
Deactivated User
Hi,

I am not sure what exactly you are trying to achieve. But if I got you right, you want to create an ArcGIS Server service without using ArcGIS Desktop tools or ArcGIS Server Manager. This can be done by copying the .cfg and .sts files of an existing map service in the C:\Program Files\ArcGIS\Server10.0\server\user\ and then pasting them with some other name in the same folder. Restart ArcGIS Server, refresh GIS Servers node to see your newly added service is there.

This method allows you to set all the settings for a service by using configuration tags without using any GUI. Good solution for batch service producing, too. Is it what you are looking for?
0 Kudos
origudes
Deactivated User
Thanks Alex

Actually, i was referring to a a web-based application which presents layers originated from one ore more web map service.

I know that this could be coded in the config.xml file, but was not sure how. For example, in my previous email  (see the attached code there) it is application which is currently using only one map service.

Any idea?

Cheers
0 Kudos
AlexeyTereshenkov
Deactivated User
I think I have finally realized what you really want to do. I guess you are using either ArcGIS Viewer for Flex or ArcGIS API for Flex. In the former case, you can check the Help pages which are available at http://help.arcgis.com/en/webapps/flexviewer/help/index.html. There are tons of samples there with source code. In the latter case, you can refer to the Help pages which are available at http://help.arcgis.com/en/webapi/flex/help/index.html. For instance, in this configuration file you can find how to add several operational layers: http://help.arcgis.com/en/webapps/flexviewer/live/config.xml.

Here is the sample for adding several map services into one web application: http://help.arcgis.com/en/webapi/flex/samples/index.html#/Terrain_basemap_with_custom_data/01nq00000....

Good luck!
0 Kudos
BharathiChandran
Deactivated User
tereshenkov,

If I understand correctly, you are trying to add more map services to your operational / base map layers.

You just need to add more tags of operationallayers / Baselayers for that like -

<operationallayers>
<layer label="LBHC" type="dynamic" visible="true"
url="http://arcgisserver/ArcGIS/rest/services/FirstMapservice/MapServer"/>
</operationallayers>

<operationallayers>
<layer label="LBHC" type="dynamic" visible="true"
url="http://arcgisserver/ArcGIS/rest/services/SecondMapservice/MapServer"/>
</operationallayers>

Hope it helps.
0 Kudos
J_B__K_
Deactivated User
tereshenkov,

If I understand correctly, you are trying to add more map services to your operational / base map layers.

You just need to add more tags of operationallayers / Baselayers for that like -

<operationallayers>
<layer label="LBHC" type="dynamic" visible="true"
url="http://arcgisserver/ArcGIS/rest/services/FirstMapservice/MapServer"/>
</operationallayers>

<operationallayers>
<layer label="LBHC" type="dynamic" visible="true"
url="http://arcgisserver/ArcGIS/rest/services/SecondMapservice/MapServer"/>
</operationallayers>

Hope it helps.


Hi,

I´m not sure if this is what Ori wanted, but I have to react on what you´ve posted....
DO NOT ADD more "basemaps"/"operationlayers" tags! Just add more "layer"s into them!

Like:
<map>
    <basemaps>
        <layer label="Streets" ... />
        <layer label="Aerial" .../>
        ...
    </basemaps>

    <operationallayers>
        <layer label="Boundaries and Places" .../>
        <layer label="My other content" .../>
        ...
    </operationallayers>
</map>

Look at http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Main_configuration_file/01m30000001800...
Use online help, it is very useful and helpful, see links that Alexey provided...
0 Kudos
origudes
Deactivated User
Thanks heaps for all mates..

Actually, the <operationallayers> solution suggested by tereshenkov seems like exactly what i need. I am aware that these new layers (associated to the new map service)
will be organised under a new group of layers, and that's fine with me. I assume your method will be more usable in a case that i want to have all layers under the same group,
does that make sense?

Cheers
0 Kudos