⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.rtf

📁 GIS地理信息系统开发。大名鼎鼎的MAPX+VisualBasic6.0软件开发
💻 RTF
字号:
Note: This sample application and corresponding sample code is provided
for example purposes only.  It has not undergone rigorous testing
and as such should not be shipped as part of a final application
without extensive testing on the part of the organization releasing
the end-user product.

This Visual Basic example uses the latest MapX OCX Control.  The main goal of 
this example is to show the use of the new Search capabilities in MapX.
The program shows how to use all the new search functions that 
have been added as methods of the layer object.  This shows the use of 
SearchWithinDistance, SearchWithinRectangle, SearchWithinFeature and 
SearchAtPoint.

Files:

SearchMain.frm
SearchMain.frx
SearchExample.vbp

Overview:

There are 3 Menu Item choices, the Map Control, 2 Combo boxes and a 
list box.

Under the File menu option is the "exit" option to end the program.  
Also there is a choice for Layer Control, which displays the Layer 
Control Stock MapX Dialog.  

Tools Menu option: The first three zoomIn, zoomOut, and pan all set 
the active tool to be the respective MapX default tool.

Search Tools: The First four menu items set the active tool to be a 
custom tool type used for performing the searches.

All Tools perform the search on the layer specified in the search 
layer combo box.  The SearchWithingFeature uses the FeatureSearchLayer 
to determine the layer the feature to be used is in, and the uses the 
searchLayer to perform the search for all objects that fall within the 
feature clicked in.  

While performing the search, if the control key is held down, the 
search results will include all those objects that are entirely in 
the specified region.  If the shift key is down, the search results 
will include all those objects partially in specified region.  If neither 
are down, the search results will include all those objects whose 
centroid fall within specified region.

Programmers Note: Due to the curvature of the earth, the search for 
items in a rectangle will not return everything that would fall under 
the dashed line that gets drawn.  Instead, the rectangle will be 
calculated to reflect it as if it were drawn above the earth, so the 
item in the result may not be exactly as you expect, but this is the 
desired effect.

The results of the search will be populated into the listbox.

SearchWithinDistance - This tool will allow the user to draw a circle 
and then will perform a distance search using the diameter value.

SearchWithingRectangle - This tool will allow the user to draw a 
rectangle and then will perform a search within this rectangel. See 
programmers note above.

SearchWithingFeature - This tool will allow the user to click on a layer 
that is specified as the featureSearchLayer.  The object that the user 
clicks on will then be used as the feature to search, from the searchLayer, 
all the objects that fall within that Feature.

SearchAtPoint - This tool will search for features at the specific X, Y 
location that the user clicked.

The fifth menu item is used as an on and off menu item.  If the menu item 
is checked, the search results for the layer will become the selection for 
that layer and the objects searched will become highlighted.  If the menu 
is not checked, search results are not added as the current selection.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -