Welcome to the GeoView documentation! This documentation is organized by audience and use case.
Location: app/api/
Complete API reference for interacting with GeoView:
- API Entry Points - Main API functions (createMapFromConfig, getMapViewer, etc.)
- CGPV Global Object - Global cgpv object and initialization
- MapViewer API - MapViewer instance methods
- Layer API - Layer management (add, remove, configure)
- Geometry API - Drawing and managing geometries
- API Utilities - Utility functions (core, geo, projection, date)
Location: app/layers/
Layer types, configuration, and management:
- Layers Overview - Layer types, configuration, and concepts
- Layer Sets - Layer set architecture and management
Location: app/events/
Event system and event handling:
- Event System - Core event concepts and architecture
- Event Processors - State management and event handling
- Map Events - Map-specific events
- Layer Events - Layer-specific events
- Layer Set Events - Layer set events
Location: app/config/
Map creation and configuration:
- Creating Maps - Declarative (HTML) and programmatic approaches
- Configuration Reference - Complete configuration schema and options
Location: app/packages/
Package system and development:
- Packages Overview - Package system introduction
- Core Packages - Built-in packages (time-slider, geochart, swiper, drawer, aoi-panel, custom-legend)
- Test Suite Guide - Overview of the GeoView Test Suite
- Using the Test Suite - How to configure and run tests
- Available Test Suites - Built-in test suites
- Understanding Results - Interpreting test outcomes
- Creating Custom Tests - Developer guide for custom tests
📚 Complete API Reference: For detailed TypeScript interfaces, types, classes, and functions, see our auto-generated TypeDoc API Documentation
What's in TypeDoc:
- ✓ All exported classes, interfaces, and types
- ✓ Complete function signatures with parameter details
- ✓ JSDoc comments and usage examples
- ✓ Cross-referenced type definitions
- ✓ Event payload types and validation functions
Use TypeDoc for:
- Looking up exact type definitions
- Finding all available methods on a class
- Understanding event payload structures
- Exploring internal class hierarchies
- TypeScript type checking in your IDE
Location: programming/
Best practices and patterns for contributing to GeoView core:
- Best Practices - Coding standards and conventions
- Using TypeScript - TypeScript patterns and types
- Using Zustand Store - State management internals
- Event Processor Architecture - Creating custom event processors
- Layer Set Architecture - Layer Set system internals
- Adding Layer Types - Implementing new layer types
- Logging - Logging standards and practices
- Object-Oriented Patterns - OOP patterns in GeoView
Location: app/
Guides for extending GeoView functionality:
- Packages - Overview, core packages, and development guides
- Core Package Reference - Complete package reference
- Core Package Development - Creating TypeScript packages (Rush.js)
- JavaScript Package Development - Creating vanilla JS packages
- Package Overview - Architecture and package types
📂 Documentation Structure:
- For API Users: See API Reference, Layers, and Events
- For Core Developers: See Programming Guides
- Accessibility - WCAG compliance and accessibility features
- Theming - UI themes and styling
- Loading Maps - Map initialization methods
- Accessing Types - TypeScript type definitions
| Task | Documentation |
|---|---|
| Create a map | Creating Maps |
| Add a layer | Layer API |
| Create a package | Core Package Development |
| Handle events | Event Processors |
| Use utilities | API Utilities |
| Draw geometry | Geometry API |
| Run tests | Test Suite Guide |
| Contribute code | Best Practices |
docs/
+-- README.md (this file)
+-- app/
+-- api/ # API reference documentation
+-- config/ # Map configuration and creation
+-- layers/ # Layer types and configuration
+-- events/ # Event system documentation
+-- packages/ # Packages
+-- testing/ # Test suite documentation
+-- ui/ # UI and theming
+-- *.md # Extension development guides
+-- programming/ # Internal development practices
TypeDoc (Auto-generated):
+-- docs/typedoc/ # Complete TypeScript API reference
+-- modules.html # All exported modules
+-- classes/ # Class documentation
+-- interfaces/ # Interface definitions
+-- types/ # Type definitions
+-- functions/ # Function signatures
| Type | Location | Purpose | When to Use |
|---|---|---|---|
| API Reference | docs/app/api/ |
Complete API function reference | Looking up API methods and parameters |
| Configuration | docs/app/config/ |
Map creation and configuration | Setting up maps and configuring GeoView |
| TypeDoc Reference | docs/typedoc/ |
Complete TypeScript API definitions | Looking up exact types and signatures |
| Developer Guides | docs/programming/ |
Internal architecture and patterns | Contributing to GeoView core |
| Extension Guides | docs/app/packages/ |
Creating packages | Building GeoView extensions |
GeoView uses a clear separation between listening to events and performing actions:
- Events (Listening): Use MapViewer/Layer event handlers
- Example:
cgpv.api.getMapViewer('map1').onMapMoveEnd((payload) => { ... })
- Example:
- Actions (Modifying State): Use Event Processor static methods
- Example:
MapEventProcessor.setView('map1', center, zoom)
- Example:
See Event Processors Guide for details on the architecture.
Package development uses TypeScript and the monorepo structure. See the Core Package Development Guide for complete instructions.
When adding documentation:
- API docs → Add to
app/api/ - Configuration docs → Add to
app/config/ - Layer docs → Add to
app/layers/ - Event docs → Add to
app/events/ - Package docs → Add to
app/packages/ - Internal practices → Add to
programming/ - Update this README with links
- Add cross-references to related docs
The api.maps array is now private and only accessible from the api. The cgpv.api.maps is not available anymore. To access and interact with the maps, new functions have been added.
- How to get a list of maps available
/**
* Gets the list of all map IDs currently in the collection.
*
* @returns {string[]} Array of map IDs
*/
getMapViewerIds(): string[]- How to know if a map exist
/**
* Return true if a map id is already registered.
*
* @param {string} mapId - The unique identifier of the map to retrieve
* @returns {boolean} True if map exist
*/
hasMapViewer(mapId: string): boolean- How to access a map by id
/**
* Gets a map viewer instance by its ID.
*
* @param {string} mapId - The unique identifier of the map to retrieve
* @returns {MapViewer} The map viewer instance if found
* @throws {Error} If the map with the specified ID is not found
*/
getMapViewer(mapId: string): MapViewerImplementation
const myMap = cgpv.api.getMapViewer("Map1");
myMap.layer.addGeoviewLayerByGeoCoreUUID(layer);- How to delete a map instance
/**
* Delete a map viewer instance by its ID.
*
* @param {string} mapId - The unique identifier of the map to delete
* @param {boolean} deleteContainer - True if we want to delete div from the page
* @returns {Promise<HTMLElement} The Promise containing the HTML element
*/
deleteMapViewer(mapId: string, deleteContainer: boolean): Promise<HTMLElement | void> {Implementation
if (cgpv.api.hasMapViewer(map)) {
cgpv.api.deleteMapViewer(map, false).then(() => {
resolve();
});
} else {
resolve();
}