MapMarker3D.withUnit constructor

MapMarker3D.withUnit(
  1. GeoCoordinates at,
  2. MapMarker3DModel model,
  3. double scale,
  4. RenderSizeUnit unit,
)

Creates a new 3D marker at given world coordinates, using the supplied 3D model.

The unit specifies how the 3D geometry of the model is interpreted (meters for world space, pixels or density independent pixels for screen space), while scale determines its relative size.

For RenderSizeUnit.pixels one unit of the 3D marker model will cover MapMarker3D.withUnit.scale pixels. The size of the 3D marker remains constant on the screen.

For RenderSizeUnit.densityIndependentPixels one unit of the 3D marker model will cover MapMarker3D.withUnit.scale density independent pixels. The size of the 3D marker remains constant on the screen.

For RenderSizeUnit.meters one unit of the 3D marker model will cover MapMarker3D.withUnit.scale meters in the real world. Unlike with pixels or density-independent pixels the size of the 3D marker will grow and shrink together with regular map content like streets or buildings.

The origin of the 3D model's local coordinate system is placed at the specified geographical coordinates.

Altitude component of the coordinates, if set, controls 3D marker's elevation above ground. If not set, the 3D marker is placed at ground level.

  • at The geographical coordinates where the 3D marker is placed corresponding to origin of the 3D model's local coordinate system.

  • model The 3D model used to render the 3D marker.

  • scale Scale factor to apply to the 3D model.

  • unit Determines the unit of the model vertices and whether the size of the 3D marker is expressed in world or screen space.

Implementation

factory MapMarker3D.withUnit(GeoCoordinates at, MapMarker3DModel model, double scale, RenderSizeUnit unit) => $prototype.withUnit(at, model, scale, unit);