npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vcmap/core

v6.0.6

Published

> Part of the [VC Map Project](https://github.com/virtualcitySYSTEMS/map-ui)

Downloads

5,696

Readme

VC Map Core @vcmap/core

Part of the VC Map Project

API Docs

The VC Map Core is a thin abstraction layer and wrapper around OpenLayers and Cesium. It provides a common data and feature management API and automatically synchronizes data and user actions between the 2D, oblique and 3D views. Map functions and tools can be developed against this core API to make them available in 2D, 3D and the oblique view rather than having to develop them redundantly and based on different technologies.

Features

Maps

Allows rendering content on three different maps. This allows to select the best technology for a specific usecase, but still work with the same API.

  • 2D Map using Openlayers
  • 3D Map using CesiumJs
  • Oblique Map using Openlayers

VcsApp

A main class to manage items (maps, layers, viewpoints, styles). The VcsApp has a API to add/get/list items in different Collections. For example the LayerCollection: const layer = vcsApp.layers.getByKey('myLayerName'); The VcsApp also provides an API to parse and serialize Modules. An Item can be added via parsing of a module or directly via the API.

Layers

Some layer are map specific and only work for example in 3D. Layers can be created via the API new CesiumTilesetLayer(options); or loaded into the VcsApp in a Module. The Core supports the following layer types.

Only 3D

  • CesiumTilesetLayer (3D Tiles OGC Community Standard)
  • CzmlLayer Cesium Czml (https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/CZML-Guide)
  • PointCloudLayer (using CesiumTilesetLayer)
  • TerrainLayer Cesium Quantized-Mesh (https://github.com/CesiumGS/quantized-mesh)

Supported in 2D and 3D

  • WMS Layer
  • WMTS Layer
  • TMS Layer
  • SingleImageryLayer
  • Vector Tile Layer
  • OpenstreetMap Layer

Supported in 2D, 3D and Oblique

  • WFS Layer
  • GeoJSON Layer
  • Vector Layer (allows adding Features via API) layer.addFeature(new Feature({ geometry: new Polygon({...}) }))

FeatureLayer Vector, WFSLayer, GeoJSONLayer, VectorLayer, CesiumTileset

Layers which provide Features have a common API to hide/highlight/style/access Features.

Styles

The Core supports two style types. A DeclarativeStyleItem using the Cesium 3D Tiles Styling language and a VectorStyleItem which is based on Openlayers Styling. Both Style Items can be serialized to JSON and work for VectorLayer, GeoJSONLayer, CesiumTilesetLayer, VectorTileLayer. DeclarativeStyleItem can be used to style each Feature in a dataset based on attribute values or rules depending on attributes. VectorStyleItem are best to for static styling of a complete dataset.

Configuration Management

The core provides a flexible and fully customizable configuration management. Items like maps, layers, viewpoints, styles can be managed in Modules. Modules can be serialized to a JSON file and loaded/unloaded by the VcsApp.

Interactions API

The Interactions API is an abstraction layer to handle map events. For example a click event on the Map. This allows for developing applications which work in 2D/3D or oblique.

Feature Editor API

Based on the Interactions API the Feature Editor provides functionality to create, select, and transform Features.

Parametrized Features API

Vector Features can be shown in a VectorLayer or GeoJSONLayer. GeoJSON Feature are just 2D, and in a 2D Map the Feature will just be rendered. In 3D a Feature can be rendered differently depending on the VectorLayer settings or the properties of the Feature.

  • Render a Feature as a Solid via extrusion Parameter.
  • Render a Point Feature as a Gltf Model.
  • Render a Feature as a Classification Primitive to classifiy other content.

More options see VectorProperties

Categories

Categories is a concept to serialize and parse arbitrary JSON Objects from a Module.

Openlayers/CesiumJs

The full capability of Openlayers and CesiumJs are available. In 3D, a map for example has an accessor to get the corresponding Cesium Scene.

Extensibility

With the ClassRegistry concept and API its possible to register your own Item Types to the Framework. For example with app.layerClassRegistry.registerClass('myLayer', MyLayerClass) its possible to implement a custom layer while following the Layer Interface. This allows to reuse the Module serialization/parsing Concept with custom Items.

Getting Started

  • clone Repo
  • npm install

Coding Conventions

Exporting from a module

  • You should export all variables, functions, class etc. from a module which are required to use the API.
  • Party of your module which should be part of the library must be added to the index.ts file manually
  • Make sure the names of exports have meaning outside of their module. E.g. a function names extend(destination: extent3D, source: extend3D):void would need to be rephrased to extend3DExtent.