示例#1
0
        /// <summary>
        /// Raises the OnMapMouseClick event.
        /// </summary>
        /// <param name="e"></param>
        private void RaiseOnMapMouseClick(MouseEventArgs e)
        {
            if (this.Map != null)
            {
                var view = _renderer.Create(this.Width, this.Height, this.Map,
                                            (float)this.Map.Projection.ToZoomFactor(this.MapZoom), this.MapCenter, false, true);

                // get scene coordinates.
                double x, y;
                var    fromMatrix = view.CreateFromViewPort(this.Width, this.Height);
                fromMatrix.Apply(e.X, e.Y, out x, out y);
                var geoCoordinates = this.Map.Projection.ToGeoCoordinates(x, y);

                // create map user control event args.
                var args = new MapControlEventArgs(e, geoCoordinates);
                this.OnMapMouseClick(args);
                if (MapMouseClick != null)
                {
                    MapMouseClick(args);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Raises the OnMapMouseClick event.
        /// </summary>
        /// <param name="e"></param>
        private void RaiseOnMapMouseClick(MouseEventArgs e)
        {
            if (this.Map != null)
            {
                View2D view = _renderer.Create(this.Width, this.Height, this.Map,
                                               (float)this.Map.Projection.ToZoomFactor(this.MapZoom), this.MapCenter, false, true);

                // get scene coordinates.
                double[]      scenCoordinates = view.FromViewPort(this.Width, this.Height, e.X, e.Y);
                GeoCoordinate geoCoordinates  = this.Map.Projection.ToGeoCoordinates(scenCoordinates[0],
                                                                                     scenCoordinates[1]);

                // create map user control event args.
                MapControlEventArgs args
                    = new MapControlEventArgs(e, geoCoordinates);

                this.OnMapMouseClick(args);
                if (MapMouseClick != null)
                {
                    MapMouseClick(args);
                }
            }
        }
示例#3
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseClick(MapControlEventArgs e)
 {
 }
示例#4
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseWheel(MapControlEventArgs e)
 {
 }
示例#5
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseMove(MapControlEventArgs e)
 {
 }
示例#6
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseDown(MapControlEventArgs e)
 {
 }
 private void mapControl1_MapMouseMove(MapControlEventArgs e)
 {
 }
 private void mapControl1_MapMouseClick(MapControlEventArgs e)
 {
 }
示例#9
0
        /// <summary>
        /// Raises the OnMapMouseWheel event.
        /// </summary>
        /// <param name="e"></param>
        private void RaiseOnMapMouseWheel(MouseEventArgs e)
        {
            if (this.Map != null)
            {
                View2D view = _renderer.Create(this.Width, this.Height, this.Map,
                    (float)this.Map.Projection.ToZoomFactor(this.MapZoom), this.MapCenter, false, true);

                // get scene coordinates.
                double[] scenCoordinates = view.FromViewPort(this.Width, this.Height, e.X, e.Y);
                GeoCoordinate geoCoordinates = this.Map.Projection.ToGeoCoordinates(scenCoordinates[0],
                    scenCoordinates[1]);

                // create map user control event args.
                MapControlEventArgs args
                    = new MapControlEventArgs(e, geoCoordinates);

                this.OnMapMouseWheel(args);
                if (MapMouseWheel != null)
                {
                    MapMouseWheel(args);
                }
            }
        }
示例#10
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseWheel(MapControlEventArgs e)
 {
 }
示例#11
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseUp(MapControlEventArgs e)
 {
 }
示例#12
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseDoubleClick(MapControlEventArgs e)
 {
 }
示例#13
0
        /// <summary>
        /// Raises the OnMapMouseClick event.
        /// </summary>
        /// <param name="e"></param>
        private void RaiseOnMapMouseClick(MouseEventArgs e)
        {
            if (this.Map != null)
            {
                var view = _renderer.Create(this.Width, this.Height, this.Map,
                    (float)this.Map.Projection.ToZoomFactor(this.MapZoom), this.MapCenter, false, true);

                // get scene coordinates.
                double x, y;
                var fromMatrix = view.CreateFromViewPort(this.Width, this.Height);
                fromMatrix.Apply(e.X, e.Y, out x, out y);
                var geoCoordinates = this.Map.Projection.ToGeoCoordinates(x, y);

                // create map user control event args.
                var args = new MapControlEventArgs(e, geoCoordinates);
                this.OnMapMouseClick(args);
                if (MapMouseClick != null)
                {
                    MapMouseClick(args);
                }
            }
        }