MapGPU Examples
Interactive demos — each demonstrates a specific API pattern with live rendering.
Core
Minimal MapView setup with OSM basemap, ScaleBar, Coordinates widget and 2D/3D mode switching.
Points, lines, polygons with holes. Step-by-step rendering debug with staggered layer loading.
Dynamically add features to a GeoJSON layer with onEachFeature callback for per-feature initialization.
Place a static image and a looping video at geographic bounds. Toggle visibility, opacity, and playback.
Switch between Bing Maps, Mapbox, ArcGIS, OSM tile sources via the IImageryProvider API.
Manage multiple layers as a unit. Cascade visibility and opacity to all child layers.
SimpleRenderer, UniqueValueRenderer, ClassBreaksRenderer, and CallbackRenderer applied to GeoJSON features with live switching.
WMS integration with capability loading, feature info queries, and LayerList widget control.
Globe (3D)
Hybrid DTED terrain source (local + remote): 3D vertex elevation from DTED and 2D hillshade overlay with DT2 > DT1 > DT0 precedence.
Fog, night imagery, water mask, atmosphere configuration for 3D globe rendering with live config preview.
Vector features on 3D globe — world cities, flight routes, and continental regions with shader projection.
3D globe mode with pitch/bearing, OSM tile projection on unit sphere, and animated camera flights.
TileJSON terrain source with 3D vertex displacement and optional 2D hillshade overlay.
Tools & Interaction
Interactive drawing: Point, Polyline, Polygon placement with vertex editing. Undo/redo, toolbar widget, 2D/3D.
Zoom to geographic extents with optional padding. Istanbul, Turkey, Europe, World bounds with animated transitions.
Arc camera animation between cities. Zoom out, pan, zoom in — Istanbul, London, Tokyo, New York.
All pointer and lifecycle events: dblclick, mousedown, mouseup, contextmenu, zoomstart/end, movestart/end with live log.
Restrict map panning to geographic bounds. Camera center clamped within Turkey boundaries.
Geodesic measurement: point coordinates, distance (Haversine), area (spherical). Unit switching, 2D/3D support.
Advanced snapping: endpoint, midpoint, intersection, nearest-on-edge, and angle guide snaps. Toggle snap types live, draw near features to see snapping in action.
ZoomControlWidget (+/- buttons) and AttributionWidget with dynamic attribution text management.
Widgets & Analysis
Spatial analysis: 50km buffer, Istanbul-Ankara route sampling, elevation queries with results panel.
CPU Grid++ clustering with anti-aliased Canvas 2D labels, configurable theme presets, and cluster click zoom-to-bounds.
Interactive LOS analysis: observer/target placement, height sliders, building obstacle detection, elevation profile chart. 2D/3D mode + city navigation.
LayerList, ScaleBar, Coordinates (DD/DMS/MGRS), BasemapGallery, and mock search integration.
Visualization
OpenFreeMap vector tiles with fill-extrusion rendering. ClassBreaksRenderer height-based color ramp, directional lighting, city navigation.
PNG/SVG icon rendering on point features. Sprite atlas, tint color, rotation, UniqueValueRenderer with per-category icons.
Load GLTF/GLB 3D models at map positions. PBR-lite shading, heading/pitch/roll orientation, instanced rendering.
Live OpenStreetMap building footprints via Overpass API. Auto-fetch on pan/zoom, color by levels/type, opacity control. 2D & Globe modes.
Data Formats
Parse CesiumJS temporal data format -- sampled positions, clock metadata, polyline and polygon entities.
Parse GPS tracks, waypoints, and routes. Elevation and timestamp extraction from GPX XML.
Parse KML XML data -- Placemarks, Styles, ExtendedData. Point, LineString, Polygon geometries rendered on map.
JulianDate, Clock tick, SampledProperty interpolation. Play/pause, speed control, animated vehicle position.
JSON-based declarative styling for 3D Tiles -- color conditions, show/hide expressions, point size.
Advanced
User-defined WGSL vertex/fragment shaders via WGSLLayer. Animated polyline trail effect with GPU-side animation.
Box, Cylinder, Sphere, Wall, Corridor mesh generation with vertex count, triangle count, and byte size output.
Military symbology — 3000+ point/line/area symbols, interactive drawing, modifiers, tactical graphics. Place mode, free SIDC input, 2D/3D.
Bloom, HDR tone mapping (ACES/Reinhard), SSAO, FXAA configuration with resolvePostProcessConfig.
Wireframe overlay showing 32x32 vertex grid per tile. Terrain development tool -- visualize vertex positions and height brush.