Skip to content

gi-nx


gi-nx / MapCamera

ts
type MapCamera = {
  bearing: number;
  center: [number, number];
  metresPerPixel: number;
  mode: "2D" | "3D";
  pitch: number;
};

Properties ​

PropertyTypeDescription
bearingnumberDegrees clockwise from north.
center[number, number][lng, lat] under the centre of the map canvas.
metresPerPixelnumberGround metres covered by one screen pixel, at center's latitude.
mode"2D" | "3D"The same two views setTopView takes: '2D' is straight down, '3D' lets pitch bite.
pitchnumberDegrees away from straight down. Always 0 while mode is '2D'.