private void _CreateMap()
        {
            if (_userServicesInfo.MapInfo == null)
            {
                _userServicesInfo.MapInfo = new UserMapInfo();
            }

            MapInfoWrap wrap = new MapInfoWrap(_servicesInfo.MapInfo,
                                               _userServicesInfo.MapInfo);

            _map = new Map(wrap, _servers, _exceptionHandler);
        }
Esempio n. 2
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="mapInfo">Map information.</param>
        /// <param name="servers">Servers collection.</param>
        /// <param name="exceptionHandler">Exceptions handler.</param>
        internal Map(MapInfoWrap mapInfo,
            ICollection<AgsServer> servers,
            IServiceExceptionHandler exceptionHandler)
        {
            Debug.Assert(mapInfo != null);
            Debug.Assert(exceptionHandler != null);

            _exceptionHandler = exceptionHandler;

            // create layers
            _CreateLayers(mapInfo.Services, servers);

            // set selected basemap layer
            _SetSelectedBaseMap();

            _mapInfo = mapInfo;

            // Set current map server.
            _mapServer = _GetMapServer(_layers);

            // Map should be initialized later.
            _inited = false;
        }