Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ol-cs-libs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ol-cs-libs

Enterprise WebGIS Core Library integrating OpenLayers and Cesium

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

ol-cs-libs

简体中文

Enterprise WebGIS Core Library integrating OpenLayers and Cesium.

Features

  • Integrated Support: Seamlessly manage OpenLayers Maps and Cesium Viewers.
  • Framework Agnostic: Core library is pure TypeScript/JavaScript, usable with any framework (Vue, React, Angular, Vanilla JS).
  • TypeScript Ready: Full type definitions included.
  • Build Formats: Supports ESM, UMD, and IIFE formats for maximum compatibility (Bundlers, CDN).
  • Minified Output: Production-ready minified builds.

Installation

Using Package Manager

pnpm add ol-cs-libs
# or
npm install ol-cs-libs
# or
yarn add ol-cs-libs

Peer Dependencies

Ensure you have the required peer dependencies installed:

pnpm add ol@^10.4.0 cesium@^1.138.0 ol-ext@^4.0.24 proj4@^2.10.0 lodash@^4.17.21 @turf/turf@^6.5.0

CDN

You can use the library directly via CDN (e.g., unpkg or jsdelivr):

<script src="https://unpkg.com/ol-cs-libs/dist/ol-cs-libs.umd.min.js"></script>
<!-- Or for IIFE -->
<script src="https://unpkg.com/ol-cs-libs/dist/ol-cs-libs.iife.min.js"></script>

Usage

ESM (Bundlers)

import { WebGISManager } from 'ol-cs-libs';
import Map from 'ol/Map';
import View from 'ol/View';

// Initialize Manager
const manager = new WebGISManager();

// Create OpenLayers Map
const map = new Map({
  target: 'map',
  view: new View({ center: [0, 0], zoom: 2 })
});

// Register Map with Manager
manager.setOlMap(map);

console.log(manager.getOlMap());

CDN (Browser)

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@10.4.0/ol.css">
    <script src="https://cdn.jsdelivr.net/npm/ol@10.4.0/dist/ol.js"></script>
    <script src="path/to/ol-cs-libs.iife.min.js"></script>
</head>
<body>
    <div id="map" style="width: 100%; height: 400px;"></div>
    <script>
        // Global variable 'OlCsLibs' is available
        const manager = new OlCsLibs.WebGISManager();
        
        const map = new ol.Map({
            target: 'map',
            view: new ol.View({ center: [0, 0], zoom: 2 })
        });
        
        manager.setOlMap(map);
    </script>
</body>
</html>

Development

Setup

pnpm install

Build

pnpm build

Run Examples

pnpm dev
访问地址:http://localhost:5173/examples/cdn/index.html
访问地址:http://localhost:5173/examples/vue3/index.html

This will start a dev server for the examples located in examples/ directory.

Run Tests

pnpm test

Generate Documentation

pnpm docs
访问地址:http://localhost:5173/apidoc/index.html

License

ISC

Keywords

openlayers

FAQs

Package last updated on 11 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts