版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1MapX培训教程培训教程2今天的内容今天的内容7MapX概述7MapX 基本概念 (Map/Layer/Tools) 7图层集(Layers)7工具集(Tools)7Selections and Features37查找 (Find)7数据集(DataSets)7专题图(Themes)7对象编辑(Object Editing)7地图输出(Exporting Maps)今天的内容今天的内容41 MapX概述概述5什么是什么是MapX?MapX是MapInfo公司的地图化的ActiveX, 在使用面向对象语言(如:VB, VC+, Delphi, PB)开发的应用中嵌入MapX可以使您的应用具有
2、强大的地图功能。MapX提供了各种属性、方法和事件,实现对地图数据的各种操作。6Buzzwords7Object 基本术语基本术语7对象Object - A thing. Something. Anything.7属性Property - An adjective that describes an object.7方法Method - An action that an object can do.7集合Collection - A group of similar objects.7事件Event - A reaction an object makes to certain stimul
3、i.8Object Quickview Note: This is the entire object diagramSelectionFeaturesLayerLayersLegendThemesDatasetsMap92 MapX 基本概念基本概念10地图对象地图对象Map所有对象的基础7Everything is off of this object7Maps are the basic building blocks for MapX. Each map is defined by (at minimum) a Layers collection11地图对象属性地图对象属性(Map P
4、roperties)7Annotations7AreaUnit7AutoRedraw7Bounds7CenterX7CenterY7CurrentTool7DataSet7DataSetGeoField7DataSets7DataSetTheme7DefaultStyle7DisplayCoordSys7DefaultConversionResolution7ExportSelection 7FeatureFactory 7GeoDictionary7Geoset7Geosets7GeoSetWidth7hWnd7Layers7MapPaperHeight7MapPaperWidth7MapU
5、nit7MaxSearchTime7MousePointer7NumericCoordSys 7PaperUnit7PreferCompactLegends7Rotation7SelectionStyle7Title7TitleText7Version7Zoom12CenterX, CenterY, Zoom控制地图显示的三个要素控制地图显示的三个要素7Controls what part of the map is showing7CenterX = Longitude (X coord)7CenterY = Latitude (Ycoord)7Zoom = How many miles(k
6、m, ft, etc) are being displayed across the mapXY13CurrentTool当前工具当前工具7Sets what tool the user has in their hands7预定义工具Many pre-defined tools, including: &Zoom In/Out&Label&Radius Select &Pan Tool7自定义工具You also have the ability to create custom defined tools14MapX Methods7AboutBox7Cli
7、pLine7ClipLineV7ConvertCoord7ConvertCoordV7CreateCustomTool7Distance7ExportMap7IsPointVisible7PrintMap7PropertyPage7Refresh7SetSize7ZoomToMETHODS15ConvertCoord7Convert between coordinates and coordinates (either direction)7Useful for dealing with Mouse_Move eventsMETHODS16Distance7Computes distance
8、given two pairs of geographic coordinatesMETHODS17ZoomTo7Sets the CenterX, CenterY and Zoom properties with one methodMETHODS18MapX 事件事件 (Events)7AnnotationAdded7AnnotationChanged7Click7DataMismatch7DrawUserLayer7ErrorMapViewChanged7MouseDown7ThemeModifyRequested7MouseMove7MouseUp7PolyToolUsed7Reque
9、stData7ResolveDataBind7SelectionChanged7ToolUsedEVENTS19MapInfo terminology update20Annotations7A collection of text and symbols7Sit on top of all layers7Similar to a maps cosmetic layer in MapInfo Professional21Geosets22GeoSet7A collection of Layers and settings for each layer7Similar to a MapInfo
10、Pro workspace7MapX includes Geoset Manager.exe utility to manipulate geosets23What is a Geoset?7描述地图属性的文本文件7类似于 MapInfo Pro workspace7在geoset中设置每一层地图的属性&Through tags in *.gst file&If a tag is absent, MapX uses default value&Look in MapX help for list of all available tags24Geoset!GEOSET!
11、VERSION 100begin_metadataGEOSETNAME = ”SalesAreaGEOSETCENTER = 137.69,38.256GEOSETZOOMLEVEL = 1800GEOSETPROJECTION = 1,0TABLERegions.tabFILE = Regions.tabTABLERegions.tabISVISIBLE = TRUETABLERegions.tabAUTOLABEL = TRUETABLERegions.tabZOOMMIN = 300TABLERegions.tabZOOMMAX = 800TABLERegions.tabDISPLAYP
12、ENLINESTYLE = 2TABLERegions.tabDISPLAYPENLINEWIDTH = 1TABLERegions.tabDISPLAYPENCOLOR = 16711680end_metadata25创建创建/编辑编辑 GeoSets7Use Geoset Manager.exe7Make sure to give each geoset a unique name26Changing Geosets7At Design Time (Property Page)7Map1.Geoset = “United States”&*.gst must be in same
13、directory as GeoDictionary7m_ctrlMapX.SetGeoset(“us.gst”)7Map1.Layers(1).LoadGeosetLayers(“us.gst”)7During Auto matching27GeoDictionary28GeoDictionary7See help topic in MapX 3.57Contains list of registered tables to use during automatic databinding (automatching).7Map.GeoDictionary=“GeoDictionary”7H
14、KEY_LOCAL_MACHINESoftwareMapInfoMapX3.0GeoDictionary=“c:program filesmapinfo mapxmapsgeodict.dct”29GeoDictionary Contents7For each registered file&User friendly name&List of indexed fields&Refining table name&List of Geoset file names30Migm30.exe (Geodictionary Manager)31Command Line
15、 Parameters7Useful for registering tables during an install program7migm30.exe tablepath | geosetpath |tablepath /geoset=geosetfile/file=commandfilepath /remove32Command Line Parameters7See help topic in MapX 3.5 !33Sample 27Annotations, Add, Modify and Remove7Change Map View - Map object properties
16、 and methods7Load Geoset - switch between different geosets343 图层对象(图层对象(Layers)35Layers7A collection of Layer Objects &Much like transparencies on an overhead7Each layer has its own attributes&Labels&Zoom Layering &Style Override&Visibility&Selectablility36Pacific Ocean37Lay
17、ers Methods7Add &Add a MapInfo map layer to the layers collection7Remove&Removes a layer from the collection7Move&Repositions a layer within the collection38Layers Methods7CreateLayer&Create a new MapInfo table and add it to map7LayersDlg&Displays a built-in “Layer Control” dialo
18、g to manipulate the layers39Sample 37Layer Control Dialog7Modify part of properties of a Layer7Add a UserDrawLayer404 User Tools41ToolUsed7An event that is fired after a user releases the mouse button from a tools use 7You can find out information such as:&What tool was used&Where user click
19、ed mouse button&Where user released mouse button&Distance between pointsEVENTS42Sample 47 More standard select tools7 A custom tool to show the X-Y coordinate of the cursor435 Selections and Features44Selections7A collection of Feature objects&Created :8When user clicks with a selection
20、tool8By means of the various select methods7MapX automatically highlights all selected features7Each layer object has its own Selection collection45Features Collection7A collection of Feature objects, created by methods of the features object7Similar to the selection object, except:&The features
21、 do not get high-lit&Each layer object may have multiple features collections467SelectAll7ClearSelection7SelectByPoint7SelectByRadius7SelectByRectangle7SelectByRegion7AllFeatures7NoFeatures7SearchAtPoint7SearchWithinDistance7SearchWithinRectangle7SearchWithinFeatureFeature/Selection Methods47Sam
22、ple 57 SearchWithinDistance7 SearchWithinFeature - Search Dealers example7SelectByRectangle7SelectByRegion486 Find49Find7Find allows you to locate items on a map7The layer you are searching must have an indexed column in order for you to utilize the find method50Find Terminology7FindFeature Object i
23、s returned by the search method of the find object7A Refining Boundary is used to distinguish between multiple features with the same name7Result Codes provide information on the Find Object51Sample 67 A Find exaple - Find dealers within Distance nnn of a city of a state527 Datasets53DataBindingDAOO
24、ther SourcesODBCNOTES54Data BindingStateSalesDistrictWA4459 WESTTX6979 SCFL3423 SENY3922 EAST55DataBinding7A way of tying data from an external source to the map7Creates a when data is bound to a MapX map layer7Why?&Theme maps&Query information&Summarization of data geographically56DataT
25、ypes You May Use7Data Access Object Recordset (DAO)7Open DataBase Connectivity (ODBC) data source7Lotus Notes7Delphi Native Data Source7VB Data Control & Remote Data Control7MapInfo Table57Data Binding7When matching records in the database with features on the map, you may specify the match or l
26、et MapX choose using the GeoDictionary7Geodictionary - Maintains information about map layers and their referencing capabilities58GeoDictionaryLet theSpecify the matchYou specify match between your data and the MapX.Data Binding59Three Types of Databinding7Normal& Bind data to existing map featu
27、res7XY Bind Requires use of BindLayer object&Creates symbols on the fly from long/lat coordinates already in your database7PointRef Requires use of BindLayer object&Creates symbols on the fly by matching geographic information in your database against features on an existing map layer60BindL
28、ayer Object7Used as a parameter to the Datasets.add method7Specifies how to create new symbols from your data7Must be able to geo-reference data&Needs Longitude and Latitude &A field that can be matched up against a map layer (zipcode, city, district, etc)61BindLayer Object Properties7CoordS
29、ys7FileSpec7KeyLength7LayerName7LayerType7RefColumn17RefColumn27ReferenceLayer62Cached Data Binding7Aggregation done by MapX7Data cached by MapX&Initial load time on Datasets.Add&Fast redraw & thematics7Bogs down for very large datasets63 “Normal” Data Binding7Datasource Fields aggregate
30、d and attached to an existing map layer7You can specify Key Field and/or Layer&OR7MapX can determine Key Field and/or Layer64X-Y Data Binding7Datasource already contains X & Y coordinates7You specify X,Y and Key Fields via BindLayer object7New point layer is created7Remaining datasource fiel
31、ds are bound to the new layer as a dataset65Point Reference Binding7Datasource contains geographic key such as zipcode7You specify key Field and Reference layer via BindLayer object7New point layer is created with a point for each row in the datasource7Remaining datasource fields are bound to the ne
32、w layer as a dataset66Dynamic DataBinding&Aggregation done by Datasource&Data fetched when needed by MapX8No initial wait on Datasets.Add8Redraw speed dependant on Datasource speed8Data is requested by Geographic Key&Can handle very large datasets&XY and Point reference binds are not
33、 supported67Custom Dataset Types7COM Based&Standard extensible architecture7Install, Register, and Go7Documented in Help File7Examples&Notes&ODBC&Delphi68Data Binding Demo7Dynamic vs Normal7X-Y and PointRef7Uses ODBC Dataset7C+ code samples (uses C+ wrappers)69Sample 77 5 examples of
34、 Data Binding of data type:DAO, ODBC, SetLayer, GlobalHandle, and Unbound7And of binding type of normal, X-Y point, and point reference708 Themes71专题图(专题图(Themes)7Thematic mapping is the process of shading your map based on your data.7A valuable data visualization tool7Many examples&High Income
35、areas&Population Distribution&Rainfall maps&Sales distribution maps72Types of Themes7Ranges7Pie Chart7Bar Chart7Graduated Symbol7Dot Density7Individual ValueThese themes may be “layered” on top of one another7374Creating Themes7A Theme hangs off of a dataset in the object model7You add a
36、 theme to a dataset75Manipulating a Theme7ThemeDlg method7Modify the ThemeProperties object76Modify Theme Dialogs included with MapX77Legend7The key to understanding a theme7Tells what each style on the map means data-wise7You may modify the Legend by&Using the LegendDlg method (easiest)&Mod
37、ifying each LegendText object individually&Modifying the LegendTitle and SubTitle78Modify Legend Dialog79Time to see this stuff in action7More of the VB sample app, showing:&Adding Datasets&Using a BindLayer object&Creating a Theme80Sample 87 Example of theme types:&Ranged&Ba
38、r Chart&Pie Char&Graduated Symbol&Dot Density&Individual Value819 Object Editing82Feature Factory7An object off of the map object that allows you to do:&Feature Creation&Feature Manipulation83FeatureFactory Methods7BufferFeatures7CombineFeatures7CreateArc7CreateCircularRegion7CreateEllipticalRegion7CreateLine7CreateRegion7CreateSymbol7CreateText7EraseFeature7IntersectFeatures7IntersectionPoints7IntersectionTest84BufferFeatures7Returns a feature representing a buffer region. 85EraseFe
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《城市轨道交通概论》试题库15套
- 基本公共卫生服务项目考试题库(含答案)
- 中级银行从业资格考试风险管理模拟题及答案第二套
- 信息技术学业水平考试模拟七信息技术试题(解析版)
- 中国铁塔计算机类笔试题
- 商业计划书的制作与演示考试满分答案
- (新版)中级养老护理资格考试题库(完整版)
- 2025年榆林市榆阳区特岗教师招聘考试笔试试题
- 东方航空面试流程
- 北师大中文系古代文学专业历年考研试题
- 物业工程夜班岗位职责
- 产品经理笔面试经典题型分享-费米问题
- 学校校服选用采购会议记录
- 备考2024年中考数学专题突破(全国通用)专题2-3 八种隐圆类最值问题圆来如此简单(解析版)
- 山东省精神卫生中心招聘试题及解析
- 企业员工廉洁行为规范培训课件
- JT-T 795-2023 事故汽车修复技术规范
- 国家开放大学《数据结构》课程实验报告(实验2-线性表)参考答案
- DBJ50-200-2014建筑桩基础设计与施工验收规范
- 幼儿园财务审计报告范文
- 全国行政区划代码
评论
0/150
提交评论