/// <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); } } }
/// <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); } } }
/// <summary> /// Called on a mouse up event. /// </summary> /// <param name="e"></param> protected void OnMapMouseClick(MapControlEventArgs e) { }
/// <summary> /// Called on a mouse up event. /// </summary> /// <param name="e"></param> protected void OnMapMouseWheel(MapControlEventArgs e) { }
/// <summary> /// Called on a mouse up event. /// </summary> /// <param name="e"></param> protected void OnMapMouseMove(MapControlEventArgs e) { }
/// <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) { }
/// <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); } } }
/// <summary> /// Called on a mouse up event. /// </summary> /// <param name="e"></param> protected void OnMapMouseUp(MapControlEventArgs e) { }
/// <summary> /// Called on a mouse up event. /// </summary> /// <param name="e"></param> protected void OnMapMouseDoubleClick(MapControlEventArgs e) { }