AddPageGeoViewportA
Page properties, Measurement and coordinate units
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to AddPageGeoViewport and string arguments are interpreted using the current SetAnsiMode code page
Appends a geospatial measurement viewport (/VP) with a /Subtype /GEO measure dictionary, /GCS coordinate system, and 4-corner control points (/LPTS and /GPTS) to the selected page per ISO 32000-2 §12.9
Syntax
Delphi
Function DLAddPageGeoViewportA(InstanceID: Integer; Left, Bottom, Right, Top: Double; EPSG: Integer; LatMin, LonMin, LatMax, LonMax: Double; Name: PAnsiChar): Integer;
DLL
int DLAddPageGeoViewportA(int InstanceID, double Left, double Bottom, double Right, double Top, int EPSG, double LatMin, double LonMin, double LatMax, double LonMax, const char* Name);
Parameters
| Left | Left page coordinate of the viewport bounding box |
|---|---|
| Bottom | Bottom page coordinate of the viewport bounding box |
| Right | Right page coordinate of the viewport bounding box |
| Top | Top page coordinate of the viewport bounding box |
| EPSG | Coordinate system EPSG code (for example 4326 for WGS 84 or 3857 for Web Mercator); codes 4000 to 4999 are written as a geographic system (/GEOGCS) and all other codes as a projected system (/PROJCS), identified by /EPSG alone |
| LatMin | Minimum latitude of the geographic bounding box in degrees |
| LonMin | Minimum longitude of the geographic bounding box in degrees |
| LatMax | Maximum latitude of the geographic bounding box in degrees |
| LonMax | Maximum longitude of the geographic bounding box in degrees |
| Name | Optional viewport name written to /Name |
Return values
1 when the geospatial viewport was appended to the selected page, or 0 on failure
See also
PagePointToLatLon, LatLonToPagePoint, AddPageMeasureViewport