Interactive Examples
Explore practical examples of svelte-openlayers components with live code demos and detailed explanations.
Basic Map
BeginnerFoundationSimple OpenLayers map with tile layer and reactive bindings
ViewMapLayer.TileReactive bindingsFeatures
CoreStylingInteractivePoints, lines, and polygons with custom styling and click interactions
Feature.PointFeature.LineStringFeature.PolygonhoverStyle / selectedStyleOverlay.HoverOverlay.PopupBasic Marker Styling
CoreStylingBeginnerSimple circle markers with custom fill and stroke styles on world cities
Feature.PointcreateCircleStyleLayer.VectorCustom fill and strokeLayer Management
AdvancedDataMultiple tile sources and vector layer visibility controls
Multiple tile sourcesLayer visibilityBase layer switchingData organizationSVG Icon Markers
CoreStylingIconsUse SVG icons as map markers with dynamic color tinting and size control
createIconStyleSVG iconsColor tintingDynamic sizingStatic Image Layer
CoreDataDisplay a single static image as a map layer using a custom pixel projection and extent.
Layer.StaticCustom projectionImage extentAttributionsFeature Events
EventsOverlaysInteractiveInteractive features with onHover, onClick, and child overlays
Feature event callbacksonHover / onHoverEndonClick / onSelect / onDeselecthoverStyle / selectedStyleOverlay.HoverOverlay.PopupBasic Tooltips
InteractionUIContext-sensitive tooltips with hover and click modes
Overlay.HoverOverlay.PopuphoverStyle / selectedStyleFeature eventsHTML Tooltips
InteractionUITooltipsTooltips with custom HTML content
Overlay.TooltipManagerhoverContentselectContentHTML stringsComponent Tooltips
InteractionUIOverlaysComponentsFeature overlays using reusable Svelte components for rich content
Overlay.HoverOverlay.PopuphoverStyle / selectedStyleSvelte componentsBidirectional Selection
InteractionSelectionAdvancedSynchronized selection between table and map features with programmatic control
Interaction.Selectbind:selectedFeaturesProgrammatic selectionFeature collectionsState synchronizationDraw Interaction
InteractionDrawingGeometryInteractive drawing of points, lines, polygons, and circles with real-time feature tracking
Interaction.DrawDrawing typesFeature creationVector sourcesEvent handlingGeometry stylingDraw Control
ControlDrawingGeometryBetaControl for drawing points, lines, polygons, and circles
Control.DrawDrawing typesFeature creationVector sourcesEvent handlingGeometry stylingDynamic Theming
AdvancedStylingUIInteractive theme customization with CSS variables and dark mode
Dynamic ThemesDark ModeCSS VariablesScoped StylesRuntime ThemingScoped CSS Styling
AdvancedStylingCSS VariablesMultiple maps with scoped CSS variable themes sharing a single View
CSS VariablesScoped StylesShared ViewgetCSSVariablecreateCircleStyleGeoJSON Vector Source
AdvancedDataGeoJSONLoad GeoJSON data from remote URLs or inline objects with custom VectorSource
VectorSourceGeoJSON formatRemote data loadingCustom layer bindingFeature stylingWebGL Rendering
AdvancedWebGLPerformanceHigh-performance rendering of large point datasets using WebGL with dynamic styling
LayerWebGLWebGL renderingExpression-based stylesDynamic variablesLarge datasetsPerformance optimization