/// <summary> /// Initializes a new map /// </summary> /// <param name="size">Size of map in pixels</param> public Map(Size size) { Size = size; _Layers = new LayerCollection(); _backgroundLayers = new LayerCollection(); _backgroundLayers.ListChanged += _Layers_ListChanged; //_Layers.ListChanged += new System.ComponentModel.ListChangedEventHandler(_Layers_ListChanged); _variableLayers = new VariableLayerCollection(_Layers); BackColor = Color.Transparent; _MaximumZoom = double.MaxValue; _MinimumZoom = 0; _MapTransform = new Matrix(); MapTransformInverted = new Matrix(); _Center = new Point(0, 0); _Zoom = 1; _PixelAspectRatio = 1.0; }
/// <summary> /// Initializes a new map /// </summary> /// <param name="size">Size of map in pixels</param> public Map(Size size) { _mapViewportGuard = new MapViewPortGuard(size, 0d, Double.MaxValue); Factory = GeoAPI.GeometryServiceProvider.Instance.CreateGeometryFactory(_srid); _layers = new LayerCollection(); _backgroundLayers = new LayerCollection(); _variableLayers = new VariableLayerCollection(_layers); BackColor = Color.Transparent; _mapTransform = new Matrix(); MapTransformInverted = new Matrix(); _center = new Point(0, 0); _zoom = 1; WireEvents(); if (_logger.IsDebugEnabled) _logger.DebugFormat("Map initialized with size {0},{1}", size.Width, size.Height); }
/// <summary> /// Initializes a new map /// </summary> /// <param name="size">Size of map in pixels</param> public Map(Size size) { Size = size; Layers = new LayerCollection(); _variableLayers = new VariableLayerCollection(_Layers); BackColor = Color.Transparent; _MaximumZoom = double.MaxValue; _MinimumZoom = 0; _MapTransform = new Matrix(); MapTransformInverted = new Matrix(); _Center = new Point(0, 0); _Zoom = 1; _PixelAspectRatio = 1.0; }