Skip to content

henc · Viewport & Map Area

Center / zoom / scale / rotation / map area configuration

int hencSetCenter( double cx, double cy )

Used to specify the center point of map display.

  • double cx : IN (longitude, degree)
  • double cy : IN (latitude, degree)
  • = 0 : Success
  • < 0 : Fail

int hencGetCenter( double &cx, double &cy )

It is used to obtain the current map center point.

  • double &cx : OUT (longitude, degree)
  • double &cy : OUT (latitude, degree)
  • = 0 : Success
  • < 0 : Fail

double hencGetCenterX()

Obtain the longitude value of the current map center point.

None

Longitude value of the map center point


double hencGetCenterY()

Obtain the latitude value of the current map center point.

None

Latitude value of the map center point


int hencSetZoom( double scale )
  • This function is used to specify the magnification ratio of the map. It specifies the ratio of one angle of latitude and longitude to one pixel of the screen.
  • It works in conjunction with the function, only in units..

scale : IN (magnification ratio)

  • = 0 : Success
  • < 0 : Fail

double hencGetZoom()
  • As a function that obtain zoom ratio of map, set the ratio between lat/lng 1 degree and 1 pixel in screen.
  • It is linked with function, and there is only difference in unit.

None

Map zoom ratio value


double hencGetScale()
  • This value is a value indicating the ratio of the actual distance to the pixel size on the actual screen specified by the function.

None

Scale value N in 1:N


int hencSetScale( double value )
  • This function is used to specify the scale value of the map. It specifies the value of N in the map scale value expressed by 1: N.
  • This value determines the reduction ratio of the screen by calculating the appropriate ratio from the pixel size on the actual screen specified by the or function.
  • It is interlocked with the function, and only the units are different.

value : IN (Scale)

  • = 0 : Success
  • < 0 : Fail

int hencSetRotation( double deg )

Specify the angle of rotation of the map on the screen.

deg : IN (CW, degree)

  • = 0 : Success
  • < 0 : Fail

double hencGetRotation()

Obtain the angle of rotation of the map currently displayed on the screen.

None

Map rotation angle. CW(Unit: Degree)


int hencSetMapArea( double minx, double miny, double maxx, double maxy )

Set the map scale value so that the area of the specified square block is displayed in the map display area. At this time, the rotation value is set to zero.

  • double minx : IN (longitude, Minimum longitude value in the area)
  • double miny : IN (latitude, Minimum latitude value in the area값)
  • double maxx : IN (longitude, Maximum longitude value in the area)
  • double maxy : IN (latitude, Maximum latitude value in the area)
  • = 0 : Success
  • < 0 : Fail

int hencGetMapArea( double &minx, double &miny, double &maxx, double &maxy )

Obtains the latitude and longitude coordinates of the map currently displayed on the screen.

  • double &minx : OUT (longitude, Minimum longitude value in the area)
  • double &miny : OUT (latitude, Minimum latitude value in the area)
  • double &maxx : OUT (longitude, Maximum longitude value in the area)
  • double &maxy : OUT (latitude, Maximum latitude value in the area)
  • = 0 : Success
  • < 0 : Fail

The value obtained by this function may be different from the value set by function.


int hencSetMapParameter( double cx, double cy, double zoom, double rotation)
  • Center coordinates, magnification ratio, and rotation are set at once.
  • double cx : IN (Center longitude of display area, degree)
  • double cy : IN (Center latitude of display area, degree)
  • double zoom : IN (Map scaling rate, Ratio of 1 latitude to 1 pixel on screen)
  • double rotation : IN (Map rotation angle, CW, degree)
  • = 0 : Success
  • < 0 : Fail

int hencGetMapParameter( double &cx, double &cy, double &zoom, double &rotation )

Obtains screen settings collectively.

  • double &cx : OUT (Center longitude of display area, degree)
  • double &cy : OUT (Center latitude of display area, degree)
  • double &zoom : OUT (Map zoom ration, Ratio of 1 latitude to 1 pixel on screen)
  • double &rotation : OUT (Map rotation angle, CW, degree)
  • = 0 : Success
  • < 0 : Fail

bool hencIsMapRectInView( double minx, double miny, double maxx, double maxy )

It is checked whether or not the specified area is partially included in the display area.

  • double minx : IN (longitude, Minimum longitude value in the area)
  • double miny : IN (latitude, Minimum latitude value in the area)
  • double maxx : IN (longitude, Maximum longitude value in the area)
  • double maxy : IN (latitude, Maximum latitude value in the area)
  • true : Indicates that the specified area is partially contained within the screen
  • false : Indicates that the specified area is out of the screen

bool hencIsGlRectInView( double minx, double miny, double maxx, double maxy )

It is checked whether or not the specified area is partially included in the display area.

  • double minx : IN (GIPos, Minimum x value in the area)
  • double miny : IN (GIPos, Minimum y value in the area)
  • double maxx : IN (GIPos, Maximum x value in the area)
  • double maxy : IN (GIPos, Maximum y value in the area)
  • true : Indicates that the specified area is partially contained within the screen
  • false : Indicates that the specified area is out of the screen