2.1.1 • Published 3 years ago

masterportalapi v2.1.1

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
3 years ago

masterportalapi

The masterportalAPI is an API to include and show map-content on your webpage. It's based on OpenLayers and extended with functions to easily use configuration and infrastructure files from the masterportal, a feature-rich mapping app developed by geowerkstatt hamburg. It also provides the creation of a 3d map by using olcs and cesium. Check masterportal.org for further information.

Usage

Install the masterportalAPI in your project with npm install masterportalapi. The project does not have a default export, but various named exports. Generate and check the documentation as described below for details.

If you want to create a 3d map, you have to provide the peer dependency cesium.

By importing the project by module name like import ... from "masterportalAPI", most bundlers and bundler configurations will include the whole masterportalAPI. If you only need a subset of the provided functions and want to keep your build clean, directly import the needed functions like import {createMap} from "masterportalAPI/src/map.js.

Scripts

ScriptEffect
npm run exampleStarts a dev server with a running example. Please mind that the page seen is not part of the masterportalAPI, but merely an environment for manual testing. Change code within ./example/index.js to try things. Free hot reloading thanks to parcel.
npm run generate-jsdocGenerates the project documentation within the folder ./docs.
npm testRuns all tests. Prints code coverage to console.
npm run test:watchRuns all tests in watch mode. Good practive to let this run during development in a separate terminal.

About Babel

The Babel dev dependencies are purely added for development tests and jest tests. Babel is required for testing since Node does not support ES6 in .js files so far.

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.8.0

3 years ago

1.9.0

3 years ago

1.10.0

3 years ago