JSNavigationControl
API for setting and managing map navigation (compass) features.
You can create it using the Module.getNavigation API.
var navigation = Module.getNavigation();Function
getPadding() → JSVector2D
Returns the padding value of the navigation (compass).
Return
x : left Padding setting value.
y : top Padding setting value.
Sample
Refer to the function getNavigationProperties.
var padding = Module.getNavigation().getPadding();setPadding(number left, number top)
Sets the padding value for the navigation (compass).
Name
Type
Description
left
number
left Padding value
top
number
top Padding value
Sample
Refer to the function setNavigationPadding.
Module.getNavigation().setPadding(50, 50);Getter / Setter
getNaviPos(), setNaviPos(align) → number
Sets the alignment (Align) of the navigation (compass).
Name
Type
Description
Return
Returns navigation alignment type.
Sample
Refer to the function getNavigationProperties.
var naviAlign = Module.getNavigation().getNaviPos();
// ... or ...
Module.getNavigation().setNaviPos(Module.JS_NAVIGATION_LT);getNaviVisible(), setNaviVisible(display) → number
Sets the visibility of the navigation (compass).
Name
Type
Description
Return
number: navigation visibility type.
Sample
Refer to the function getNavigationProperties.
var naviDisplay = Module.getNavigation().getNaviVisible();
// ... or ...
Module.getNavigation().setNaviVisible(Module.JS_VISIBLE_AUTO);Last updated