HOME > Á¦Ç°¼Ò°³ > MapInfo Á¦Ç°±º
    
MapX Properties
 
* Annotations
* AreaUnit
* AutoRedraw
* BackColor
* Bounds
* CenterX
* CenterY
* CurrentTool
* DataSet
* DataSetGeoField
* DataSets
* DataSetTheme
* DefaultStyle
* DisplayCoordSys
* ExportSelection
* FeatureFactory
* GeoDictionary
* Geoset
* Geosets
* GeoSetWidth
* hWnd
* InfotipSupport
* InfotipPopUpDelay
* Layers
* MapUnit
* MapPaperHeight
* MapPaperWidth
* MapScreenHeight
* MapScreenWidth
* MatchNumericFields
* MatchThreshhold
* MaxSearchTime
* MouseIcon
* MousePointer
* MouseWheelSupport
* DefaultConversionResolution
* NumericCoordSys
* PanAnimationLayer
* PaperUnit
* PreferCompactLegends
* RedrawInterval
* Rotation
* SaveMapAsGeoset
* SearchPath
* SelectionStyle
* Title
* TitleText
* Version
* WaitCursorEnabled
* Zoom

CenterX and CenterY
 
Controls where the center of the map is
CenterX = Longitude (X coord)
  Map1.CenterX = -79.2387
CenterY = Latitude (Ycoord)
  Map1.CenterY = 42.6882

CurrentTool
 
Sets what tool the user has in their hands
Many pre-defined tools, including:
Zoom In/Out
Label
Selector Arrow
Radius Select
You also have the ability to create custom defined tools.

Pre-Defined Tools
 
  ToolConstant Description
  miArrowTool
miPanTool
miCenterTool
miZoomInTool
miZoomOutTool
miSymbolTool
miTextTool
miSelectTool
miRadiusSelectTool
miRectSelectTool
miPolygonSelectTool
miLabelTool
miAddLineTool
miAddPolylineTool
miAddRegionTool
miAddPointTool
usage info for use in custom code
Pans the map.
Recenters the map where user clicks
Shows more area of the map
Shows less area of the map
Puts symbol annotations on map.
Puts text annotations on map.
Selects a feature.
Selects within a user-drawn circle.
Selects within a user-drawn rectangle.
Selects within a user-drawn region
Labels map where user clicks.
Adds a line feature to the map
Adds a polyline feature to the map
Adds a region feature to the map
Adds a point feature to the map

Creating a CustomTool
 
»ç¿ëÀÚ Á¤ÀÇ ToolÀ» »ç¿ëÇϱâ À§ÇÑ 3´Ü°è:
  * Create the Tool - Tell MapX that this tool exists.
* Write the tool handler - What should the tool do?
* Put the tool into the user¡¯s hand - Set the Map.CurrentTool property

Create CustomTool
 
Map.CreateCustomTool ToolNumber, Type, Cursor, [ShiftCursor], [CtrlCursor]
* ToolNumber
   - Number of the tool used to reference it later. This value can be an integer between 1 and 999.
* Type
   - The type describes the tool behavior. This takes a ToolType Constants value.
* Cursor
   - Shape when the tool is the CurrentTool and the cursor is over the map.
   - This takes a CursorConstants value.
* ShiftCursor
   - A CursorConstants value, indicating the cursor that should appear while the SHIFT key is held down.
   - Optional; if omitted, the SHIFT key has no effect on the cursor.
* CtrlCursor
   - A CursorConstants value, indicating the cursor that should appear while the CTRL key is held down.
   - Optional; if omitted, the CTRL key has no effect on the cursor.

Create The Tool
 
Option Explicit
¡®use a constant for the tool number, it¡¯s easier to remember
¡®when you have several tools
Const myTool As Integer = 1

Private Sub Form_Load()
   ¡®Create the tool
   Map1.CreateCustomTool myTool, miToolTypeCircle, miRadiusSelectCursor
   ¡®Give the tool to the user
   Map1.CurrentTool = myTool
End Sub


Tool¡¯s Handler
 

Private Sub Map1_ToolUsed(ByVal ToolNum As Integer,
   ByVal x1 As Double, ByVal y1 As Double, ByVal x2 As Double,
   ByVal y2 As Double, ByVal Distance As Double,
   ByVal Shift As Boolean, ByVal Ctrl As Boolean, EnableDefault As Boolean)
'Only do this if we have the radius select tool
'(This sub gets called after *any* tool is used)
If ToolNum = myTool Then
   Msgbox ¡°You¡¯re circle started at point ¡± & X1 & ¡°, ¡± & Y1 & _ and is: ¡± & Distance & ¡° miles in radius.¡±
End If
End Sub


Layers
 

* A collection of Layer Objects
   - Much like transparencies on an overhead
* Each layer has its own attributes
   - Labels
   - Zoom Layering
   - Style Override
   - Visibility
   - Selectablility


Layer Object Layers Collection
 

* Each map has a collection of Layers
* The Layers Collection is made up of 0-n Layer Objects.
* The Layers Collection has methods and properties used to add or remove Layer objects.
* The Layer Object is made up of a collection of features, properties and styles.


´Ù¾çÇÑ ÁÖÁ¦µµ