Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Problem getting the map

$
0
0
I have a problem with the following line of code, I use a SOE.
Code:

        public static IMap getMyMap(IServerObjectHelper serverObject) throws IOException{
               
                IMapServer2 mapServer_2 = (IMapServer2) serverObject.getServerObject();               
                IMapServerObjects2 serverObjs_2 = (IMapServerObjects2) mapServer_2;               
                IMap map = serverObjs_2.getMap(mapServer_2.getDefaultMapName());
               
                return map;
        }

when I run it, I get the following error.
Code:

AutomationException: No such interface supported
Can anyone help?, What am I doing wrong?

Thank you.

Viewing all articles
Browse latest Browse all 1374

Trending Articles