你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
朱新颖
赞同来自:
IAGSServerObjectName3 pSOName = null; IAGSServerObjectName3 psoname = null; IAGSServerConnection con = null;// new AGSServerConnection(); IAGSServerConnectionFactory2 confactory = new AGSServerConnectionFactory() as IAGSServerConnectionFactory2; IPropertySet propertyset = new PropertySet(); propertyset.SetProperty(URL, http://localhost:6080/arcgis/rest/services); con = confactory.Open(propertyset, 0); IAGSEnumServerObjectName enumSOName = con.ServerObjectNames; pSOName = (IAGSServerObjectName3)enumSOName.Next(); while (pSOName != null) { if ((pSOName.Type == MapServer) && (pSOName.Name == China_mapService)) { psoname = pSOName; break; } pSOName = (IAGSServerObjectName3)enumSOName.Next(); } IName pName = psoname as IName; IMapServer mapserver = pName.Open() as IMapServer; string name = mapserver.DefaultMapName; IRecordSet recordSet = mapserver.QueryFeatureData(mapserver.DefaultMapName, 0, null); ITable table = recordSet.Table;
要回复问题请先登录或注册
1 个回复
朱新颖
赞同来自:
可以,通过IMapServer.QueryFeatureData()方法,获取IRecordSet,然后通过其Table属性获取ITable。
要回复问题请先登录或注册