interface

PointSymbol

Symbol definition for point features. Supports simple circle markers, icon images, and SDF icons. Includes optional glow halo and background circle effects.

Constructor

Properties

Name Type Access Description
type 'simple-marker' | 'icon' | 'sdf-icon' read/write Symbol type discriminant. 'simple-marker' for circles, 'icon' for loaded images, 'sdf-icon' for SDF rendering.
color [number, number, number, number] read/write RGBA fill color (0-255)
size number read/write Symbol diameter in pixels
outlineColor [number, number, number, number] read/write Outline RGBA color (0-255). Optional.
outlineWidth number read/write Outline width in pixels. Optional.
src string read/write Icon ID loaded via MapView.loadIcon(). Only for type='icon'.
rotation number read/write Icon rotation angle in degrees (clockwise). Optional.
glowColor [number, number, number, number] read/write Glow halo RGBA color (0-255). When set, a soft radial halo is drawn behind the point/icon. Optional.
glowSize number read/write Glow spread in pixels beyond the point/icon size. Default 0 (no glow). Optional.
backgroundColor [number, number, number, number] read/write Background circle fill color (RGBA 0-255). Draws a filled circle behind the icon. Optional.
backgroundSize number read/write Background circle diameter in pixels. 0 = no background. Optional.

Example

// Simple marker with glow
const symbol: PointSymbol = {
  type: 'simple-marker',
  color: [255, 0, 0, 255],
  size: 10,
  glowColor: [255, 100, 100, 200],
  glowSize: 8,
};

// Icon with background circle
const iconSymbol: PointSymbol = {
  type: 'icon',
  color: [255, 255, 255, 255], // tint color
  size: 24,
  src: 'hospital',
  backgroundColor: [0, 120, 255, 255],
  backgroundSize: 32,
};