public override void AddLayerAndChildren(CommonLayer layer) { ArcImsLayer arcImsLayer = layer as ArcImsLayer; if (arcImsLayer == null) { throw new ArcImsException(String.Format("A {0} cannot be added to an ArcImsMap.", layer.GetType().Name)); } AddLayer(arcImsLayer); if (arcImsLayer.Children != null && arcImsLayer.Children.Count > 0) { foreach (CommonLayer child in arcImsLayer.Children) { AddLayerAndChildren(child); } } }
public override void AddLayer(CommonLayer layer, string definitionQuery) { ArcImsLayer arcImsLayer = layer as ArcImsLayer; if (arcImsLayer == null) { throw new ArcImsException(String.Format("A {0} cannot be added to an ArcImsMap.", layer.GetType().Name)); } AddLayer(arcImsLayer, definitionQuery); }