Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SphereStyle

Interface for configuring the visual appearance of Rectangles.

Hierarchy

  • SphereStyle

Index

Properties

Optional altitude

altitude: number | boolean | StyleValueFunction<number | boolean> | StyleZoomRange<number | boolean>

The altitude of the style in meters. The altitude defines the distance in the vertical direction between the ground plane at 0 meters and the geometry/style. If altitude is set to true, the altitude from the feature's geometry coordinates will be used automatically. If a number is set for altitude, the altitude of the feature's geometry is ignored and the value of "altitude" is used instead. The height must be defined in meters.

defaultvalue

false

experimental

Optional fill

Sets the color to fill the Sphere. This attribute is valid for Circle, Rect, Text and Polygon.

see

Color for a detailed list of possible supported formats.

Optional offsetX

offsetX: number | string | StyleValueFunction<number | string> | StyleZoomRange<number | string>

Offset the shape in pixels on x-axis. A positive value offsets to the right, a negative value to the left. The default unit is pixels.

example
// offset Sphere by 1m to the left
{ type: "Sphere", zIndex: 0, fill:'blue', radius: 24, offsetX: "-1m"}

Optional offsetY

offsetY: number | StyleValueFunction<number> | StyleZoomRange<number>

Offset the shape in pixels on y-axis. A positive value offsetY offsets downwards, a negative value upwards. The default unit is pixels.

example
// offset Sphere by 1m to the top
{ type: "Sphere", zIndex: 0, fill:'blue', radius: 24, offsetY: "-1m"}

Optional offsetZ

offsetZ: number | string | StyleValueFunction<number | string> | StyleZoomRange<number | string>

Offset the shape in pixels on z-axis. A positive value offsets up, a negative value down. The default unit is pixels.

example
// offset Sphere by 1m to the top
{ type: "Sphere", zIndex: 0, fill:'blue', radius: 24, offsetZ: "1m"}

Optional opacity

opacity: number | StyleValueFunction<number> | StyleZoomRange<number>

Defines the opacity of the style. The value must be between 0.0 (fully transparent) and 1.0 (fully opaque). It is valid for all style types.

defaultvalue

1

Optional radius

radius: number | StyleValueFunction<number> | StyleZoomRange<number>

The Radius of the Sphere. The default unit is pixels. The radius of "Sphere" must be defined in pixels.

example
// define a Sphere with a radius of 32 pixel.
{
    zIndex: 0,
    type: "Sphere",
    fill: "red",
    radius: 32
}

Optional scaleByAltitude

scaleByAltitude: boolean | StyleValueFunction<boolean> | StyleZoomRange<boolean>

Scales the size of a style based on the feature's altitude. If it's enabled (true), features closer to the camera will be drawn larger than those farther away. When off (false), the size of the style is always the same size, regardless of its actual altitude, as if it were placed on the ground (altitude 0). This attribute applies to styles of type "Rect", "Image", "Text", "Circle", "Line", "Box", or "Sphere" whose size (width, radius, strokeWidth) that are using "map" alignment only. If the size attribute is defined in meters, scaleByAltitude is enabled by default, for pixels it is disabled.

defaultvalue

false (pixels), true (meters)

experimental

type

type: "Sphere"

Specifies the type of style to render.

zIndex

zIndex: number | StyleValueFunction<number> | StyleZoomRange<number>

Indicates the drawing order within a layer. Styles with larger zIndex value are rendered above those with smaller values. The zIndex is defined relative to the "zLayer" property. If "zLayer" is defined all zIndex values are relative to the "zLayer" value.

Optional zLayer

zLayer: number | StyleValueFunction<number>

Indicates drawing order across multiple layers. Styles using zLayer with a high value are rendered on top of zLayers with a low value. If no zLayer is defined the zLayer depends on the display layer order. The first (lowest) layer has a zLayer value of 1.

example

{...zLayer: 2, zIndex: 5} will be rendered on top of {...zLayer: 1, zIndex: 10}

Generated using TypeDoc