Calibrate

The Calibrate method sets the map calibration.

 

Syntax

object.Calibrate( pProjection, DefaultProjection, ctrlLeft, ctrlTop, ctrlRight, ctrlBottom, wLeft, wTop, wRight, wBottom)

 

Parameter

Type

Description

pProjection

pProjection

required; defined projection variable, see remarks

DefaultProjection

Boolean

optional; use default projection

ctrlLeft

Double

optional; left calibration point location in page units

ctrlTop

Double

optional; top calibration point location in page units

ctrlRight

Double

optional; right calibration point location in page units

ctrlBottom

Double

optional; bottom calibration point location in page units

wLeft

Double

optional; new left calibration point in projection units, see remarks

wTop

Double

optional; new top calibration point in projection units, see remarks

wRight

Double

optional; new right calibration point in projection units, see remarks

wBottom

Double

optional; new bottom calibration point in projection units, see remarks

 

Remarks

  1. If the projection is unknown, the unit type is unknown.

  2. If the projection is Unprojected Lat/Long, the units are latitude/longitude.

  3. If the projection is known and not Unprojected Lat/Long, the units are meters. The exception to this is when the ellipsoid type is "Standard sphere of one unit". In that case the unit type is "Unit of 1."

 

Example

This example calibrates a blank map window.

 

'Creates an instance of the MapViewer Application

'object and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes MapViewer visible

 mvApp.Visible = True

 

'Creates a map document object and assigns it

'to the variable named "Plot"

 Set Plot = mvApp.Documents.Add(1)

 

'Copy the projection and set a new projection for

'the pProjection parameter

 Set Proj = Plot.CopyDocProjection

  Proj.ProjectionType = mvProjLambertConformalConic

 

'Calibrate the document

  Plot.Calibrate(pProjection:=Proj, DefaultProjection:=False, _

  ctrlLeft:=0.0, ctrlTop:=0.0, ctrlRight:=0.0, ctrlBottom:=0.0, _

  wLeft:=-13803616, wTop:=6082427, wRight:=-7347086, wBottom:=2841288)

 

'Delete the copy of the projection

  Proj.Delete

 

Used by: PlotDocument object