C# Class WpfMapControl.MapControl

Interaction logic for UserControl1.xaml
Inheritance: System.Windows.Controls.UserControl
Afficher le fichier Open project: gkrsu/maparound.core

Private Properties

Свойство Type Description
AnimatedPan void
BeginMapDrawing Thread
CalcAnimationRectangles void
ConvertBitmap System.Windows.Media.Imaging.BitmapSource
DrawAnimated void
DrawDragging void
DrawGeneral void
FitViewBoxSize void
GetAvgMouseSpeed ICoordinate
GetMouseSpeed ICoordinate
MapDrawWorker void
MapViewBoxToClientRectangle System.Windows.Rect
MeasureMouseMovementParameters void
OnMouseLeftButtonDown void
OnMouseLeftButtonUp void
OnMouseMove void
OnMouseWheel void
OnSizeChanged void
Play void
PlayFade void
PrepareForSelect ICoordinate
SetViewBoxWithAnimation void
WheelTimerTick void
WhetherViewBoxChanged bool

Méthodes publiques

Méthode Description
ChangeZoom ( int deltaPercent, double mouseX, double mouseY ) : void

Changes a zoom.

ClientToMap ( Point point ) : ICoordinate

Transforms screen coordinates to map coordinates.

GetFeatureAtPosition ( Point position ) : Feature

Finds a topmost feature of the map at specified point.

GetFeaturesAtPosition ( Point position ) : IList

Finds features of the map at specified point.

MapControl ( ) : System

Initializes a new instance of MapAround.UI.WPF.MapControl

MapToClient ( ICoordinate point ) : Point

Transforms map coordinates to screen coordinates.

Pan ( double horizontalShift, double verticalShift ) : void

Pans a map.

Pan ( double horizontalShift, double verticalShift, bool forceRedraw, bool playAnimation ) : void

Pans a map.

RedrawMap ( ) : void

Redraws a map image.

SetViewBox ( BoundingRectangle viewBox ) : void

Sets a new visible area of map.

SetViewBox ( BoundingRectangle viewBox, bool forceRedraw, bool forceSizeFitting, bool playAnimation ) : void

Sets a new visible area of map.

ZoomIn ( ) : void

Zooms in.

ZoomIn ( Point p ) : void

Zooms in.

ZoomOut ( ) : void

Zooms out.

ZoomOut ( Point p ) : void

Zooms out.

Méthodes protégées

Méthode Description
OnRender ( System.Windows.Media.DrawingContext drawingContext ) : void

Private Methods

Méthode Description
AnimatedPan ( double horizontalShift, double verticalShift ) : void

BeginMapDrawing ( ) : Thread

Start drawing map

CalcAnimationRectangles ( BoundingRectangle oldViewBox, BoundingRectangle viewBox, Rect &begin, Rect &end ) : void

Calculation of the animation Rectangle

ConvertBitmap ( System gdiPlusBitmap ) : System.Windows.Media.Imaging.BitmapSource

Converter Bitmap в BitmapSource

DrawAnimated ( System.Windows.Media.DrawingContext dc ) : void
DrawDragging ( System.Windows.Media.DrawingContext dc ) : void
DrawGeneral ( System.Windows.Media.DrawingContext dc ) : void

The main mode is called when rendering при _animated = false;

FitViewBoxSize ( BoundingRectangle viewBox ) : void

Fit Size ViewBox

GetAvgMouseSpeed ( ) : ICoordinate
GetMouseSpeed ( System.DateTime satrtTime, System.DateTime endtime, Point startPoint, Point endPoint ) : ICoordinate
MapDrawWorker ( ) : void

Render Map

MapViewBoxToClientRectangle ( BoundingRectangle r ) : Rect

Translated from the card in the client rectangle ViewBox

MeasureMouseMovementParameters ( Point p ) : void

Measurement of the parameters you move the mouse

OnMouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
OnMouseLeftButtonUp ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
OnMouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void
OnMouseWheel ( object sender, System.Windows.Input.MouseWheelEventArgs e ) : void
OnSizeChanged ( object sender, EventArgs e ) : void
Play ( Rect startRectangle, Rect endRectangle ) : void

Reproduction shift Rectangle

PlayFade ( ) : void

Playing a manifestation of the effect of image

PrepareForSelect ( Point position ) : ICoordinate
SetViewBoxWithAnimation ( Rect begin, Rect end ) : void

Set ViewBox with animation

WheelTimerTick ( object sender, EventArgs e ) : void
WhetherViewBoxChanged ( BoundingRectangle newViewBox ) : bool

Has been modified ViewBox

Method Details

ChangeZoom() public méthode

Changes a zoom.
public ChangeZoom ( int deltaPercent, double mouseX, double mouseY ) : void
deltaPercent int A value (percents) by which a zoom change
mouseX double An X coordinate of the mouse
mouseY double A Y coordinate of the mouse
Résultat void

ClientToMap() public méthode

Transforms screen coordinates to map coordinates.
public ClientToMap ( Point point ) : ICoordinate
point Point A point on the screen
Résultat ICoordinate

GetFeatureAtPosition() public méthode

Finds a topmost feature of the map at specified point.
public GetFeatureAtPosition ( Point position ) : Feature
position Point A point at which to find feature
Résultat Feature

GetFeaturesAtPosition() public méthode

Finds features of the map at specified point.
public GetFeaturesAtPosition ( Point position ) : IList
position Point A point at which to find feature
Résultat IList

MapControl() public méthode

Initializes a new instance of MapAround.UI.WPF.MapControl
public MapControl ( ) : System
Résultat System

MapToClient() public méthode

Transforms map coordinates to screen coordinates.
public MapToClient ( ICoordinate point ) : Point
point ICoordinate A point on the map
Résultat Point

OnRender() protected méthode

protected OnRender ( System.Windows.Media.DrawingContext drawingContext ) : void
drawingContext System.Windows.Media.DrawingContext
Résultat void

Pan() public méthode

Pans a map.
public Pan ( double horizontalShift, double verticalShift ) : void
horizontalShift double Horizontal shift in pixels
verticalShift double Vertical shift in pixels
Résultat void

Pan() public méthode

Pans a map.
public Pan ( double horizontalShift, double verticalShift, bool forceRedraw, bool playAnimation ) : void
horizontalShift double Horizontal shift in pixels
verticalShift double Horizontal shift in pixels
forceRedraw bool A value indicating whether a map image should be rendered /// even if the viewing area is unchanged
playAnimation bool A value indicating whether an animation effect is played
Résultat void

RedrawMap() public méthode

Redraws a map image.
public RedrawMap ( ) : void
Résultat void

SetViewBox() public méthode

Sets a new visible area of map.
public SetViewBox ( BoundingRectangle viewBox ) : void
viewBox BoundingRectangle Bounding rectangle defining an area of view
Résultat void

SetViewBox() public méthode

Sets a new visible area of map.
public SetViewBox ( BoundingRectangle viewBox, bool forceRedraw, bool forceSizeFitting, bool playAnimation ) : void
viewBox BoundingRectangle Bounding rectangle defining an area of view
forceRedraw bool A value indicating whether a map image should be rendered /// even if the viewing area is unchanged
forceSizeFitting bool A value indicating whether a view box sizes should be corrected /// to fit map control sizes
playAnimation bool A value indicating whether an animation effect is played
Résultat void

ZoomIn() public méthode

Zooms in.
public ZoomIn ( ) : void
Résultat void

ZoomIn() public méthode

Zooms in.
public ZoomIn ( Point p ) : void
p Point A mouse position
Résultat void

ZoomOut() public méthode

Zooms out.
public ZoomOut ( ) : void
Résultat void

ZoomOut() public méthode

Zooms out.
public ZoomOut ( Point p ) : void
p Point A mouse position
Résultat void