Esempio n. 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);
                }
            }
        }
Esempio n. 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);
                }
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseClick(MapControlEventArgs e)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseWheel(MapControlEventArgs e)
 {
 }
Esempio n. 5
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseMove(MapControlEventArgs e)
 {
 }
Esempio n. 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)
 {
 }
Esempio n. 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);
                }
            }
        }
Esempio n. 10
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseWheel(MapControlEventArgs e)
 {
 }
Esempio n. 11
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseUp(MapControlEventArgs e)
 {
 }
Esempio n. 12
0
 /// <summary>
 /// Called on a mouse up event.
 /// </summary>
 /// <param name="e"></param>
 protected void OnMapMouseDoubleClick(MapControlEventArgs e)
 {
 }
Esempio n. 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);
                }
            }
        }