The QueryMapData method queries boundary objects based on the linked data file.
Syntax
object.QueryMapData( Action, Method, VarPat, Area, Curve, Point, nObjs, dVal, PID, FillFGColor, FillBGColor, FillTransparent, FillPattern, LineColor, LineStyle, LineWidth, SymbolSet, SymbolIndex, SymbolSize, SymbolFillColor, SymbolLineColor, NthVal, FillPatternScale, FillPatternCoverMode )
Parameter |
Type |
Description |
Action |
optional; action to take with query results |
|
Method |
optional; basis for the query |
|
VarPat |
Integer |
optional; used when the map type is a pie map, bar map, or prism map
|
Area |
Boolean |
optional; true to limit query to areas |
Curve |
Boolean |
optional; true to limit query to curves |
Point |
Boolean |
optional; true to limit query to points |
nObjs |
Integer |
optional; number of objects to return that meets the criteria |
dVal |
Double |
optional; data value when the Method is mvQMDClosestToSpecVal |
PID |
String |
optional; object primary ID when the Method is mvQMDClosestToSpecObj |
FillFGColor |
optional; foreground fill color if the Action is mvQueryVerbApplyProperty, see remarks |
|
FillBGColor |
optional; background fill color if the Action is mvQueryVerbApplyProperty, see remarks |
|
FillTransparent |
Boolean |
optional; if the Action is mvQueryVerbApplyProperty, true to make background fill transparent, FillPattern must be stock or vector |
FillPattern |
String |
optional; fill pattern if the Action is mvQueryVerbApplyProperty |
LineColor |
optional; line color if the Action is mvQueryVerbApplyProperty |
|
LineStyle |
String |
optional; line style if the Action is mvQueryVerbApplyProperty |
LineWidth |
Double |
optional; line width if the Action is mvQueryVerbApplyProperty |
SymbolSet |
String |
optional; symbol set if the Action is mvQueryVerbApplyProperty |
SymbolIndex |
Integer |
optional; symbol number if the Action is mvQueryVerbApplyProperty, see remarks |
SymbolSize |
Double |
optional; symbol size if the Action is mvQueryVerbApplyProperty |
SymbolFillColor |
optional; symbol fill color if the Action is mvQueryVerbApplyProperty, see remarks |
|
SymbolLineColor |
optional; symbol outline color if the Action is mvQueryVerbApplyProperty, see remarks |
|
NthVal |
Integer |
optional; the Nth value when the Method is mvQMDClosestNthVal |
FillPatternScale |
Double |
optional; vector pattern scale if the Action is mvQueryVerbApplyProperty |
FillPatternCoverMode |
optional; picture pattern cover or tile if the Action is mvQueryVerbApplyProperty, default is mvFillCoverModeTile |
Remarks
Use the enumeration [ mvColorRed], RGB value [RGB(255,0,0)], or number [255] to set a color.
The symbol number can be found in the Symbol Properties dialog. Add 32 if you are using TrueType fonts such as GSI Default Symbols.
If the Action is mvQueryVerbShow and nObjs is 0, all boundary objects are displayed in the current layer.
The QueryMapData method is not supported if the map type is a base map or if the map type is flow map and the flow method is Connect centroids.
Example
'QueryMapData
'Create a hatch map and assign it to the variable "HatchMap"
Set HatchMap = Plot.CreateHatchMap(BoundaryFileName:=mvApp.ModuleFolder + "\Samples\CO2010.gsb", _
DataFileName:=mvApp.ModuleFolder + "\Samples\CO2010.dat", _
PIDCol:=1, VarCol:=7)
'Query the map data to show the 10 objects with the closest variable data to the max value
Plot.QueryMapData(Action:=mvQueryVerbShow, Method:=mvQMDClosestToMax, nObjs:=10, Area:=True)
'Query the map data to create a star symbol on the boundary with the average value
Plot.QueryMapData(Action:=mvQueryVerbCreateSymbol, Method:=mvQMDClosestToMean, SymbolIndex:=33, nObjs:=1, Area:=True)
Used by: PlotDocument