




已阅读5页,还剩91页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
.,MapX培训教程,.,今天的内容,MapX概述MapX基本概念(Map/Layer/Tools)图层集(Layers)工具集(Tools)SelectionsandFeatures,.,查找(Find)数据集(DataSets)专题图(Themes)对象编辑(ObjectEditing)地图输出(ExportingMaps),今天的内容,.,1MapX概述,.,什么是MapX?,MapX是MapInfo公司的地图化的ActiveX,在使用面向对象语言(如:VB,VC+,Delphi,PB)开发的应用中嵌入MapX可以使您的应用具有强大的地图功能。MapX提供了各种属性、方法和事件,实现对地图数据的各种操作。,.,Buzzwords,MapX,Method,ComponentBasedProgramming,Properties,ObjectOriented,Object,Collection,Events,DataBinding,ActiveX,GeoSet,GPS,.,Object基本术语,对象Object-Athing.Something.Anything.属性Property-Anadjectivethatdescribesanobject.方法Method-Anactionthatanobjectcando.集合Collection-Agroupofsimilarobjects.事件Event-Areactionanobjectmakestocertainstimuli.,ObjectQuickview,Note:ThisisNOTtheentireobjectdiagram,.,2MapX基本概念,地图对象Map,所有对象的基础EverythingisoffofthisobjectMapsarethebasicbuildingblocksforMapX.Eachmapisdefinedby(atminimum)aLayerscollection,.,地图对象属性(MapProperties),AnnotationsAreaUnitAutoRedrawBoundsCenterXCenterYCurrentToolDataSetDataSetGeoFieldDataSetsDataSetThemeDefaultStyleDisplayCoordSysDefaultConversionResolution,ExportSelectionFeatureFactoryGeoDictionaryGeosetGeosetsGeoSetWidthhWndLayersMapPaperHeightMapPaperWidthMapUnitMaxSearchTime,MousePointerNumericCoordSysPaperUnitPreferCompactLegendsRotationSelectionStyleTitleTitleTextVersionZoom,LotstoChooseFrom!,.,CenterX,CenterY,Zoom,控制地图显示的三个要素ControlswhatpartofthemapisshowingCenterX=Longitude(Xcoord)CenterY=Latitude(Ycoord)Zoom=Howmanymiles(km,ft,etc)arebeingdisplayedacrossthemap,X,Y,.,CurrentTool当前工具,Setswhattooltheuserhasintheirhands预定义工具Manypre-definedtools,including:ZoomIn/OutLabelRadiusSelectPanTool自定义工具Youalsohavetheabilitytocreatecustomdefinedtools,.,MapXMethods,AboutBoxClipLineClipLineVConvertCoordConvertCoordVCreateCustomToolDistance,ExportMapIsPointVisiblePrintMapPropertyPageRefreshSetSizeZoomTo,METHODS,.,ConvertCoord,Convertbetweenscreencoordinatesandgeographiccoordinates(eitherdirection)UsefulfordealingwithMouse_Moveevents,METHODS,.,Distance,Computesdistancegiventwopairsofgeographiccoordinates,METHODS,.,ZoomTo,SetstheCenterX,CenterYandZoompropertieswithonemethod,METHODS,.,MapX事件(Events),AnnotationAddedAnnotationChangedClickDataMismatchDrawUserLayerErrorMapViewChangedMouseDownThemeModifyRequested,MouseMoveMouseUpPolyToolUsedRequestDataResolveDataBindSelectionChangedToolUsed,EVENTS,MapInfoterminologyupdate,.,Annotations,AcollectionoftextandsymbolsSitontopofalllayersSimilartoamapscosmeticlayerinMapInfoProfessional,.,Geosets,.,GeoSet,AcollectionofLayersandsettingsforeachlayerSimilartoaMapInfoProworkspaceMapXincludesGeosetManager.exeutilitytomanipulategeosets,.,WhatisaGeoset?,描述地图属性的文本文件类似于MapInfoProworkspace在geoset中设置每一层地图的属性Throughtagsin*.gstfileIfatagisabsent,MapXusesdefaultvalueLookinMapXhelpforlistofallavailabletags,.,Geoset,!GEOSET!VERSION100begin_metadataGEOSETNAME=”SalesAreaGEOSETCENTER=137.69,38.256GEOSETZOOMLEVEL=1800GEOSETPROJECTION=1,0TABLERegions.tabFILE=Regions.tabTABLERegions.tabISVISIBLE=TRUETABLERegions.tabAUTOLABEL=TRUETABLERegions.tabZOOMMIN=300TABLERegions.tabZOOMMAX=800TABLERegions.tabDISPLAYPENLINESTYLE=2TABLERegions.tabDISPLAYPENLINEWIDTH=1TABLERegions.tabDISPLAYPENCOLOR=16711680end_metadata,.,创建/编辑GeoSets,UseGeosetManager.exeMakesuretogiveeachgeosetauniquename,.,ChangingGeosets,AtDesignTime(PropertyPage)Map1.Geoset=“UnitedStates”*.gstmustbeinsamedirectoryasGeoDictionarym_ctrlMapX.SetGeoset(“us.gst”)Map1.Layers(1).LoadGeosetLayers(“us.gst”)DuringAutomatching,.,GeoDictionary,.,GeoDictionary,SeehelptopicinMapX3.5Containslistofregisteredtablestouseduringautomaticdatabinding(automatching).Map.GeoDictionary=“GeoDictionary”HKEY_LOCAL_MACHINESoftwareMapInfoMapX3.0GeoDictionary=“c:programfilesmapinfomapxmapsgeodict.dct”,.,GeoDictionaryContents,ForeachregisteredfileUserfriendlynameListofindexedfieldsRefiningtablenameListofGeosetfilenames,.,Migm30.exe(GeodictionaryManager),.,CommandLineParameters,Usefulforregisteringtablesduringaninstallprogrammigm30.exetablepath|geosetpath|tablepath/geoset=geosetfile/file=commandfilepath/remove,.,CommandLineParameters,SeehelptopicinMapX3.5!,.,Sample2,Annotations,Add,ModifyandRemoveChangeMapView-MapobjectpropertiesandmethodsLoadGeoset-switchbetweendifferentgeosets,.,3图层对象(Layers),Layers,AcollectionofLayerObjectsMuchliketransparenciesonanoverheadEachlayerhasitsownattributesLabelsZoomLayeringStyleOverrideVisibilitySelectablility,.,Regions,Lines,Points,Text,PacificOcean,LayersMethods,AddAddaMapInfomaplayertothelayerscollectionRemoveRemovesalayerfromthecollectionMoveRepositionsalayerwithinthecollection,LayersMethods,CreateLayerCreateanewMapInfotableandaddittomapLayersDlgDisplaysabuilt-in“LayerControl”dialogtomanipulatethelayers,Sample3,LayerControlDialogModifypartofpropertiesofaLayerAddaUserDrawLayer,.,4UserTools,.,ToolUsed,AneventthatisfiredafterauserreleasesthemousebuttonfromatoolsuseYoucanfindoutinformationsuchas:WhattoolwasusedWhereuserclickedmousebuttonWhereuserreleasedmousebuttonDistancebetweenpoints,EVENTS,Sample4,MorestandardselecttoolsAcustomtooltoshowtheX-Ycoordinateofthecursor,.,5SelectionsandFeatures,Selections,AcollectionofFeatureobjectsCreated:WhenuserclickswithaselectiontoolBymeansofthevariousselectmethodsMapXautomaticallyhighlightsallselectedfeaturesEachlayerobjecthasitsownSelectioncollection,FeaturesCollection,AcollectionofFeatureobjects,createdbymethodsofthefeaturesobjectSimilartotheselectionobject,except:Thefeaturesdonotgethigh-litEachlayerobjectmayhavemultiplefeaturescollections,SelectAllClearSelectionSelectByPointSelectByRadiusSelectByRectangleSelectByRegion,AllFeaturesNoFeaturesSearchAtPointSearchWithinDistanceSearchWithinRectangleSearchWithinFeature,SelectionMethods,FeatureMethods,Feature/SelectionMethods,Sample5,SearchWithinDistanceSearchWithinFeature-SearchDealersexampleSelectByRectangleSelectByRegion,.,6Find,Find,FindallowsyoutolocateitemsonamapThelayeryouaresearchingmusthaveanindexedcolumninorderforyoutoutilizethefindmethod,FindTerminology,FindFeatureObjectisreturnedbythesearchmethodofthefindobjectARefiningBoundaryisusedtodistinguishbetweenmultiplefeatureswiththesamenameResultCodesprovideinformationontheFindObject,Sample6,AFindexaple-FinddealerswithinDistancennnofacityofastate,.,7Datasets,.,DataBinding,.,DataBinding,DataBinding,AwayoftyingdatafromanexternalsourcetothemapCreatesaDATASETwhendataisboundtoaMapXmaplayerWhy?ThememapsQueryinformationSummarizationofdatageographically,DataTypesYouMayUse,DataAccessObjectRecordset(DAO)OpenDataBaseConnectivity(ODBC)datasourceLotusNotesDelphiNativeDataSourceVBDataControl&RemoteDataControlMapInfoTable,.,DataBinding,Whenmatchingrecordsinthedatabasewithfeaturesonthemap,youmayspecifythematchorletMapXchooseusingtheGeoDictionaryGeodictionary-Maintainsinformationaboutmaplayersandtheirreferencingcapabilities,.,OR,DataBinding,.,ThreeTypesofDatabinding,NormalBinddatatoexistingmapfeaturesXYBindRequiresuseofBindLayerobjectCreatessymbolsontheflyfromlong/latcoordinatesalreadyinyourdatabasePointRefRequiresuseofBindLayerobjectCreatessymbolsontheflybymatchinggeographicinformationinyourdatabaseagainstfeaturesonanexistingmaplayer,BindLayerObject,UsedasaparametertotheDatasets.addmethodSpecifieshowtocreatenewsymbolsfromyourdataMustbeabletogeo-referencedataNeedsLongitudeandLatitudeORAfieldthatcanbematchedupagainstamaplayer(zipcode,city,district,etc),.,BindLayerObjectProperties,CoordSysFileSpecKeyLengthLayerNameLayerTypeRefColumn1RefColumn2ReferenceLayer,.,CachedDataBinding,AggregationdonebyMapXDatacachedbyMapXInitialloadtimeonDatasets.AddFastredraw&thematicsBogsdownforverylargedatasets,.,“Normal”DataBinding,DatasourceFieldsaggregatedandattachedtoanexistingmaplayerYoucanspecifyKeyFieldand/orLayerORMapXcandetermineKeyFieldand/orLayer,.,X-YDataBinding,DatasourcealreadycontainsX&YcoordinatesYouspecifyX,YandKeyFieldsviaBindLayerobjectNewpointlayeriscreatedRemainingdatasourcefieldsareboundtothenewlayerasadataset,.,PointReferenceBinding,DatasourcecontainsgeographickeysuchaszipcodeYouspecifykeyFieldandReferencelayerviaBindLayerobjectNewpointlayeriscreatedwithapointforeachrowinthedatasourceRemainingdatasourcefieldsareboundtothenewlayerasadataset,.,DynamicDataBinding,AggregationdonebyDatasourceDatafetchedwhenneededbyMapXNoinitialwaitonDatasets.AddRedrawspeeddependantonDatasourcespeedDataisrequestedbyGeographicKeyCanhandleverylargedatasetsXYandPointreferencebindsarenotsupported,.,CustomDatasetTypes,COMBasedStandardextensiblearchitectureInstall,Register,andGoDocumentedinHelpFileExamplesNotesODBCDelphi,.,DataBindingDemo,DynamicvsNormalX-YandPointRefUsesODBCDatasetC+codesamples(usesC+wrappers),Sample7,5examplesofDataBindingofdatatype:DAO,ODBC,SetLayer,GlobalHandle,andUnboundAndofbindingtypeofnormal,X-Ypoint,andpointreference,.,8Themes,专题图(Themes),Thematicmappingistheprocessofshadingyourmapbasedonyourdata.AvaluabledatavisualizationtoolManyexamplesHighIncomeareasPopulationDistributionRainfallmapsSalesdistributionmaps,TypesofThemes,RangesPieChartBarChartGraduatedSymbolDotDensityIndividualValue,Thesethemesmaybe“layered”ontopofoneanother,.,CreatingThemes,AThemehangsoffofadatasetintheobjectmodelYouaddathemetoadataset,ManipulatingaTheme,ThemeDlgmethodModifytheThemePropertiesobject,ModifyThemeDialogsincludedwithMapX,Legend,ThekeytounderstandingathemeTellswhateachstyleonthemapmeansdata-wiseYoumaymodifytheLegendbyUsingtheLegendDlgmethod(easiest)ModifyingeachLegendTextobjectindividuallyModifyingtheLegendTitleandSubTitle,.,ModifyLegendDialog,.,Timetoseethisstuffinaction,MoreoftheVBsampleapp,showing:AddingDatasetsUsingaBindLayerobjectCreatingaTheme,.,Sample8,Exampleofthemetypes:RangedBarChartPieCharGraduatedSymbolDotDensityIndividualValue,.,9ObjectEditing,.,FeatureFactory,Anobjectoffofthemapobjectthatallowsyoutodo:FeatureCreationFeatureManipulation,.,FeatureFactoryMethods,BufferFeaturesCombineFeaturesCreateArcCreateCircularRegionCreateEllipticalRegionCreateLineCreateRegion,CreateSymbolCreateTextEraseFeatureIntersectFeaturesIntersectionPointsIntersectionTest,.,BufferFeatures,Returnsafeat
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年审计实务操作与内部控制审计师考试试卷
- 广西城市职业大学《三维建模实训》2024-2025学年第一学期期末试卷
- 湘潭医卫职业技术学院《安全科学与工程学科论文写作指导》2024-2025学年第一学期期末试卷
- 湖州职业技术学院《职业课程与实践》2024-2025学年第一学期期末试卷
- 苏州工业园区职业技术学院《土木工程施工技术(建工)》2024-2025学年第一学期期末试卷
- 嘉兴职业技术学院《EVC企业价值创造》2024-2025学年第一学期期末试卷
- 青海交通职业技术学院《Bayes统计》2024-2025学年第一学期期末试卷
- 2025年银行风险管理的挑战与对策从业资格面试热点问题解析
- 泉州职业技术大学《工程材料与热加工》2024-2025学年第一学期期末试卷
- 吉林农业科技学院《大学生心里健康教育1》2024-2025学年第一学期期末试卷
- 2025年内江市总工会公开招聘工会社会工作者(14人)笔试模拟试题及答案解析
- 2025云南辅警笔试题目及答案
- 2025四川内江市总工会招聘工会社会工作者14人笔试备考试题及答案解析
- 2025年三支扶陕西试题及答案
- 2025年行政执法证考试必刷题库与答案
- 基孔肯雅热防控知识考试试题含答案
- 低钾血症护理常规业务学习
- 2025年职业指导师(四级)考试模拟试题汇编与模拟试题解析
- 口部运动功能评估分级标准
- 《汉服发展史》PPT课件
- 新编物理基础学王少杰(上、(下册))课后习题答案
评论
0/150
提交评论