public static GISController Create(GISServer server)
        {
            if (server.Type == null) return new EsriRESTController(server);

            switch (server.Type.ToUpper())
            {
                case "ESRI":
                    return new EsriController(server);
                case "ESRI_REST":
                case "ESRI REST":
                    return new EsriRESTController(server);
                case "OGC":
                case "WMS":
                case "WFS":
                    return new OGCController(server);
                //case "Yahoo":
                //    return new Yahoo.YahooController(server);
                //case "BING":
                //    return new BingController(server);
                //case "GOOGLE":
                //    return new GoogleController(server);
                //case "BingTiled":
                //    return new BingTiled.BingTiledController(server);
                //case "OSM":
                //case "OPEN STREET":
                //    return new OSM.OpenStreetController(server);
                //case "MAPQUEST":
                //    return new MapQuest.MapQuestController(server);
                //case "OpenStreetTiled":
                //    return new OSM_Tiled.OpenStreetController(server);
                default:
                    throw new ArgumentException(server.Type + " is unknown", "server");
            }
        }
Beispiel #2
0
        internal static void ProcessServiceReturn(XmlReader responseReader, GISServer server, string responseString)
        {
            try
            {
                while (responseReader.Read())
                {
                    if (responseReader.NodeType == XmlNodeType.Element)
                    {
                        switch (responseReader.LocalName)
                        {
                            case "SERVICE":
                                EsriService service = EsriService.ProcessNode(responseReader);

                                if (service != null)
                                {
                                    server._services.Add(service);
                                }
                                break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                string t = "";
            }

            server._lastUpdated = DateTime.Now;
        }
 public GISController(GISServer server)
 {
     _Server = server;
 }
Beispiel #4
0
 public static GISServer Create(string type, string display, string host, bool supportSearch, string servlet, string version)
 {
     GISServer srv = new GISServer();
     srv._display = display;
     srv._host = host;
     srv._servlet = servlet;
     srv._version = version;
     srv.Type = type;
     srv._supportSearch = supportSearch;
     srv._Controller = GISControllerFactory.Create(srv);
     return srv;
 }
Beispiel #5
0
        public static GISServer Create(System.Xml.Linq.XElement sERVERSERVER)
        {
            GISServer srv = new GISServer();

            foreach (XAttribute attr in sERVERSERVER.Attributes())
            {
                switch (attr.Name.LocalName)
                {
                    case "display":
                        srv._display = attr.Value;
                        break;
                    case "host":
                        srv._host = attr.Value;
                        break;
                    case "servlet":
                        srv._servlet = attr.Value;
                        break;
                    case "location":
                        srv._servlet = attr.Value;
                        break;
                    case "version":
                        srv._version = attr.Value;
                        break;
                    case "type":
                        srv.Type = attr.Value;
                        break;
                    case "credentials":
                        srv.Credentials = attr.Value;
                        break;
                }
            }

            srv._Controller = GISControllerFactory.Create(srv);
            return srv;
        }