C1Map は、マルチタッチジェスチャーを使用したズームとパンをサポートするコンテナを提供しています。ダブルタップまたはストレッチ操作でズームインしたり、ピンチ操作でズームアウトすることができます。
東西方向にマップをパンまたはスクロールするとき、HorizontalLoop プロパティを設定することにより、地図が無限にループバックできるようにすることができます。このプロパティのデフォルト値はfalseです。 HorizontalLoopプロパティをtrueに設定すると、マップは±180°E / Wで描画を停止しません。
マップコントロールには次のツールがあります。
The zooming tool in Map allows users to select the area they want to enlarge by moving the slider on the zooming tool, enabling them to analyze areas, cities, towns, countries etc. at a minute level. The Zoom tool consists of increase and decrease buttons, a thumb button and trackbar.
You can also zoom the map using the mouse wheel event. That is, the map is zoomed in when the mouse is scrolled up and the map is zoomed out when the mouse is scrolled down.
The panning tool in Map allows users to navigate across the maps in North, South, East and West directions. Panning allows users to move a map around to focus on a specific area. The Panning tool has a round pan panel and it holds four markers to indicate the directions.
A map control is incomplete without distance-scaling tool. The distance scaling tool is necessary to represent the distances between different places on Earth to depict the relief on map precisely. The Distance-Scaling tool has a scale bar, which shows metric unit above the bar and imperial unit below the bar.
Map allows you to customize the map tools. To do so, you can use the properties of MapPanTool, MapZoomTool, and MapDistanceScale class.
The tools in the Map control can be aligned either top left, middle left, bottom left, top center, middle center, bottom centre, top right, middle right or bottom right.
The tools in the Map control are positioned on the left side of a map. Although, you can change their position according to your requirements.
Following code illustrates repositioning of the map tools:
C# |
コードのコピー
|
---|---|
c1Map1.DistanceScale.Alignment = ContentAlignment.BottomRight; c1Map1.PanTool.Alignment = ContentAlignment.TopCenter; c1Map1.ZoomTool.Alignment = ContentAlignment.MiddleLeft; c1Map1.ZoomTool.Orientation = Orientation.Horizontal; |
C1Map also allows you to set the custom location and size of a map tool by setting the Bounds property. Following code demonstrates the use of Bounds property to set the custom location and size of the Pan tool:
C# |
コードのコピー
|
---|---|
c1Map1.PanTool.Bounds = new Rectangle(100, 100, 100, 100);
|