版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、.,1,MapX培训教程,.,2,今天的内容,MapX概述 MapX 基本概念 (Map/Layer/Tools) 图层集(Layers) 工具集(Tools) Selections and Features,.,3,查找 (Find) 数据集(DataSets) 专题图(Themes) 对象编辑(Object Editing) 地图输出(Exporting Maps),今天的内容,.,4,1 MapX概述,.,5,什么是MapX?,MapX是MapInfo公司的地图化的ActiveX, 在使用面向对象语言(如:VB, VC+, Delphi, PB)开发的应用中嵌入MapX可以使您的应用具有
2、强大的地图功能。 MapX提供了各种属性、方法和事件,实现对地图数据的各种操作。,.,6,Buzzwords,MapX,Method,Component Based Programming,Properties,Object Oriented,Object,Collection,Events,DataBinding,ActiveX,GeoSet,GPS,.,7,Object 基本术语,对象Object - A thing. Something. Anything. 属性Property - An adjective that describes an object. 方法Method - An
3、 action that an object can do. 集合Collection - A group of similar objects. 事件Event - A reaction an object makes to certain stimuli.,8,Object Quickview,Note: This is NOT the entire object diagram,.,9,2 MapX 基本概念,10,地图对象Map,所有对象的基础 Everything is off of this object Maps are the basic building blocks for
4、 MapX. Each map is defined by (at minimum) a Layers collection,.,11,地图对象属性(Map Properties),Annotations AreaUnit AutoRedraw Bounds CenterX CenterY CurrentTool DataSet DataSetGeoField DataSets DataSetTheme DefaultStyle DisplayCoordSys DefaultConversionResolution,ExportSelection FeatureFactory GeoDicti
5、onary Geoset Geosets GeoSetWidth hWnd Layers MapPaperHeight MapPaperWidth MapUnit MaxSearchTime,MousePointer NumericCoordSys PaperUnit PreferCompactLegends Rotation SelectionStyle Title TitleText Version Zoom,Lots to Choose From!,.,12,CenterX, CenterY, Zoom,控制地图显示的三个要素 Controls what part of the map
6、is showing CenterX = Longitude (X coord) CenterY = Latitude (Ycoord) Zoom = How many miles(km, ft, etc) are being displayed across the map,X,Y,.,13,CurrentTool当前工具,Sets what tool the user has in their hands 预定义工具Many pre-defined tools, including: Zoom In/Out Label Radius Select Pan Tool 自定义工具You als
7、o have the ability to create custom defined tools,.,14,MapX Methods,AboutBox ClipLine ClipLineV ConvertCoord ConvertCoordV CreateCustomTool Distance,ExportMap IsPointVisible PrintMap PropertyPage Refresh SetSize ZoomTo,METHODS,.,15,ConvertCoord,Convert between screen coordinates and geographic coord
8、inates (either direction) Useful for dealing with Mouse_Move events,METHODS,.,16,Distance,Computes distance given two pairs of geographic coordinates,METHODS,.,17,ZoomTo,Sets the CenterX, CenterY and Zoom properties with one method,METHODS,.,18,MapX 事件 (Events),AnnotationAdded AnnotationChanged Clic
9、k DataMismatch DrawUserLayer ErrorMapViewChanged MouseDown ThemeModifyRequested,MouseMove MouseUp PolyToolUsed RequestData ResolveDataBind SelectionChanged ToolUsed,EVENTS,19,MapInfo terminology update,.,20,Annotations,A collection of text and symbols Sit on top of all layers Similar to a maps cosme
10、tic layer in MapInfo Professional,.,21,Geosets,.,22,GeoSet,A collection of Layers and settings for each layer Similar to a MapInfo Pro workspace MapX includes Geoset Manager.exe utility to manipulate geosets,.,23,What is a Geoset?,描述地图属性的文本文件 类似于 MapInfo Pro workspace 在geoset中设置每一层地图的属性 Through tags
11、 in *.gst file If a tag is absent, MapX uses default value Look in MapX help for list of all available tags,.,24,Geoset,!GEOSET !VERSION 100 begin_metadata GEOSETNAME = ”SalesArea GEOSETCENTER = 137.69,38.256 GEOSETZOOMLEVEL = 1800 GEOSETPROJECTION = 1,0 TABLERegions.tabFILE = Regions.tab TABLERegio
12、ns.tabISVISIBLE = TRUE TABLERegions.tabAUTOLABEL = TRUE TABLERegions.tabZOOMMIN = 300 TABLERegions.tabZOOMMAX = 800 TABLERegions.tabDISPLAYPENLINESTYLE = 2 TABLERegions.tabDISPLAYPENLINEWIDTH = 1 TABLERegions.tabDISPLAYPENCOLOR = 16711680 end_metadata,.,25,创建/编辑 GeoSets,Use Geoset Manager.exe Make s
13、ure to give each geoset a unique name,.,26,Changing Geosets,At Design Time (Property Page) Map1.Geoset = “United States” *.gst must be in same directory as GeoDictionary m_ctrlMapX.SetGeoset(“us.gst”) Map1.Layers(1).LoadGeosetLayers(“us.gst”) During Auto matching,.,27,GeoDictionary,.,28,GeoDictionar
14、y,See help topic in MapX 3.5 Contains list of registered tables to use during automatic databinding (automatching). Map.GeoDictionary=“GeoDictionary” HKEY_LOCAL_MACHINESoftwareMapInfoMapX3.0GeoDictionary=“c:program filesmapinfo mapxmapsgeodict.dct”,.,29,GeoDictionary Contents,For each registered fil
15、e User friendly name List of indexed fields Refining table name List of Geoset file names,.,30,Migm30.exe (Geodictionary Manager),.,31,Command Line Parameters,Useful for registering tables during an install program migm30.exe tablepath | geosetpath | tablepath /geoset=geosetfile /file=commandfilepat
16、h /remove,.,32,Command Line Parameters,See help topic in MapX 3.5 !,.,33,Sample 2,Annotations, Add, Modify and Remove Change Map View - Map object properties and methods Load Geoset - switch between different geosets,.,34,3 图层对象(Layers),35,Layers,A collection of Layer Objects Much like transparencie
17、s on an overhead Each layer has its own attributes Labels Zoom Layering Style Override Visibility Selectablility,.,36,Regions,Lines,Points,Text,Pacific Ocean,37,Layers Methods,Add Add a MapInfo map layer to the layers collection Remove Removes a layer from the collection Move Repositions a layer wit
18、hin the collection,38,Layers Methods,CreateLayer Create a new MapInfo table and add it to map LayersDlg Displays a built-in “Layer Control” dialog to manipulate the layers,39,Sample 3,Layer Control Dialog Modify part of properties of a Layer Add a UserDrawLayer,.,40,4 User Tools,.,41,ToolUsed,An eve
19、nt that is fired after a user releases the mouse button from a tools use You can find out information such as: What tool was used Where user clicked mouse button Where user released mouse button Distance between points,EVENTS,42,Sample 4,More standard select tools A custom tool to show the X-Y coord
20、inate of the cursor,.,43,5 Selections and Features,44,Selections,A collection of Feature objects Created : When user clicks with a selection tool By means of the various select methods MapX automatically highlights all selected features Each layer object has its own Selection collection,45,Features
21、Collection,A collection of Feature objects, created by methods of the features object Similar to the selection object, except: The features do not get high-lit Each layer object may have multiple features collections,46,SelectAll ClearSelection SelectByPoint SelectByRadius SelectByRectangle SelectBy
22、Region,AllFeatures NoFeatures SearchAtPoint SearchWithinDistance SearchWithinRectangle SearchWithinFeature,Selection Methods,Feature Methods,Feature/Selection Methods,47,Sample 5,SearchWithinDistance SearchWithinFeature - Search Dealers example SelectByRectangle SelectByRegion,.,48,6 Find,49,Find,Fi
23、nd allows you to locate items on a map The layer you are searching must have an indexed column in order for you to utilize the find method,50,Find Terminology,FindFeature Object is returned by the search method of the find object A Refining Boundary is used to distinguish between multiple features w
24、ith the same name Result Codes provide information on the Find Object,51,Sample 6,A Find exaple - Find dealers within Distance nnn of a city of a state,.,52,7 Datasets,.,53,DataBinding,.,54,Data Binding,55,DataBinding,A way of tying data from an external source to the map Creates a DATASET when data
25、 is bound to a MapX map layer Why? Theme maps Query information Summarization of data geographically,56,DataTypes You May Use,Data Access Object Recordset (DAO) Open DataBase Connectivity (ODBC) data source Lotus Notes Delphi Native Data Source VB Data Control & Remote Data Control MapInfo Table,.,5
26、7,Data Binding,When matching records in the database with features on the map, you may specify the match or let MapX choose using the GeoDictionary Geodictionary - Maintains information about map layers and their referencing capabilities,.,58,OR,Data Binding,.,59,Three Types of Databinding,Normal Bi
27、nd data to existing map features XY Bind Requires use of BindLayer object Creates symbols on the fly from long/lat coordinates already in your database PointRef Requires use of BindLayer object Creates symbols on the fly by matching geographic information in your database against features on an exis
28、ting map layer,60,BindLayer Object,Used as a parameter to the Datasets.add method Specifies how to create new symbols from your data Must be able to geo-reference data Needs Longitude and Latitude OR A field that can be matched up against a map layer (zipcode, city, district, etc),.,61,BindLayer Obj
29、ect Properties,CoordSys FileSpec KeyLength LayerName LayerType RefColumn1 RefColumn2 ReferenceLayer,.,62,Cached Data Binding,Aggregation done by MapX Data cached by MapX Initial load time on Datasets.Add Fast redraw & thematics Bogs down for very large datasets,.,63,“Normal” Data Binding,Datasource
30、Fields aggregated and attached to an existing map layer You can specify Key Field and/or Layer OR MapX can determine Key Field and/or Layer,.,64,X-Y Data Binding,Datasource already contains X & Y coordinates You specify X,Y and Key Fields via BindLayer object New point layer is created Remaining dat
31、asource fields are bound to the new layer as a dataset,.,65,Point Reference Binding,Datasource contains geographic key such as zipcode You specify key Field and Reference layer via BindLayer object New point layer is created with a point for each row in the datasource Remaining datasource fields are
32、 bound to the new layer as a dataset,.,66,Dynamic DataBinding,Aggregation done by Datasource Data fetched when needed by MapX No initial wait on Datasets.Add Redraw speed dependant on Datasource speed Data is requested by Geographic Key Can handle very large datasets XY and Point reference binds are
33、 not supported,.,67,Custom Dataset Types,COM Based Standard extensible architecture Install, Register, and Go Documented in Help File Examples Notes ODBC Delphi,.,68,Data Binding Demo,Dynamic vs Normal X-Y and PointRef Uses ODBC Dataset C+ code samples (uses C+ wrappers),69,Sample 7,5 examples of Da
34、ta Binding of data type:DAO, ODBC, SetLayer, GlobalHandle, and Unbound And of binding type of normal, X-Y point, and point reference,.,70,8 Themes,71,专题图(Themes),Thematic mapping is the process of shading your map based on your data. A valuable data visualization tool Many examples High Income areas
35、 Population Distribution Rainfall maps Sales distribution maps,72,Types of Themes,Ranges Pie Chart Bar Chart Graduated Symbol Dot Density Individual Value,These themes may be “layered” on top of one another,.,73,74,Creating Themes,A Theme hangs off of a dataset in the object model You add a theme to
36、 a dataset,75,Manipulating a Theme,ThemeDlg method Modify the ThemeProperties object,76,Modify Theme Dialogs included with MapX,77,Legend,The key to understanding a theme Tells what each style on the map means data-wise You may modify the Legend by Using the LegendDlg method (easiest) Modifying each
37、 LegendText object individually Modifying the LegendTitle and SubTitle,.,78,Modify Legend Dialog,.,79,Time to see this stuff in action,More of the VB sample app, showing: Adding Datasets Using a BindLayer object Creating a Theme,.,80,Sample 8,Example of theme types: Ranged Bar Chart Pie Char Graduat
38、ed Symbol Dot Density Individual Value,.,81,9 Object Editing,.,82,Feature Factory,An object off of the map object that allows you to do: Feature Creation Feature Manipulation,.,83,FeatureFactory Methods,BufferFeatures CombineFeatures CreateArc CreateCircularRegion CreateEllipticalRegion CreateLine CreateRegion,CreateSymbol CreateText EraseFeature IntersectFeatures IntersectionPoints IntersectionTest,.,84,BufferFeatures,Returns a feature representing a buff
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年复合函数测试题及答案
- 2026年从业安全知识测试题及答案
- 2026年物体沉浮能力测试题及答案
- 2026年数字营销测试题及答案
- 2026年企业竞争模拟测试题及答案
- 2026年显性性状测试题及答案
- 2026年心理健康抑郁测试题及答案
- 2026年前端知识测试题及答案
- 客户档案归档管理办法
- 护理核心操作培训资料
- 2026年高考英语真题全国一卷附答案
- 弱电系统维保招标文件
- 北京市海淀区(2025年)社工岗位考试题目及答案
- 2026年高考新高考二卷英语试卷附答案(新课标卷)
- 2026年隔离妆前素颜霜品类-知行
- 光伏行业授信分析报告
- 2026中电金信数字科技集团股份有限公司招聘初级咨询顾问4人笔试备考试题及答案解析
- 2025年版《普通高中课程标准》数学
- CCAA - 2021年05月能源管理体系基础答案及解析 - 详解版(65题)
- 社会保险法培训课件
- 进料检验报告表格-模板
评论
0/150
提交评论