Ejemplo n.º 1
0
        /// <summary>
        /// Adds the layers of the given ISelfLoadSet to the map.
        /// </summary>
        /// <param name="self">The ISelfLoadSet whose layers should be added to the map.</param>
        /// <returns>The added group.</returns>
        public IMapLayer Add(ISelfLoadSet self)
        {
            IMapLayer ml = self.GetLayer();

            if (ml != null)
            {
                Add(ml);
            }
            return(ml);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MapSelfLoadGroup"/> class.
        /// </summary>
        /// <param name="filePath">The path of the file that containes the layer data.</param>
        public MapSelfLoadGroup(string filePath)
        {
            _dataSet = DataManager.DefaultDataManager.OpenFile(filePath) as ISelfLoadSet;

            if (_dataSet?.GetLayer() is MapSelfLoadGroup layer)
            {
                Layers   = layer.Layers;
                FilePath = filePath;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MapSelfLoadGroup"/> class.
        /// </summary>
        /// <param name="filePath">The path of the file that containes the layer data.</param>
        public MapSelfLoadGroup(string filePath)
        {
            _dataSet = DataManager.DefaultDataManager.OpenFile(filePath) as ISelfLoadSet;

            var layer = _dataSet?.GetLayer() as MapSelfLoadGroup;

            if (layer != null)
            {
                Layers   = layer.Layers;
                FilePath = filePath;
            }
        }