Skip to content

control.Nav

control.Nav is a map navigation control base class, extending control.Control. It holds navigation UI, avoiding duplication. In the current source buildOn returns null and renders no content; specific nav buttons are provided by subclasses/extensions.

js
import { control } from "maptalks";

const nav = new control.Nav({
  position: "top-left",
}).addTo(map);

Constructor

js
new control.Nav(options?)

Parameters:

  • optionsObject, optional. See options below.

Options

OptionTypeDescriptionDefault
positionString | Objectcontrol position'top-left'

Common options inherited from control.Control also apply.

Methods

  • buildOn(): null — Build the control DOM; currently returns null (renders nothing).

Events

No specific events (inherits from control.Control).