open-index/open-npm huggingface dataset:
npm package: @here/generator-harp.gl
Description: Yeoman generator for harp.gl projects
Author: HERE Europe B.V.
Latest version: 0.28.0

# Harp.gl yeoman Generator

Yeoman generator for [harp.gl](https://github.com/heremaps/harp.gl) based projects.

## Pre-requirements

-   [node.js](https://nodejs.org/)
-   [yeoman](https://yeoman.io/) - Install globally with `npm install -g yo` or use without
    installation with `npx` like this `npx yo`.
-   By default, generated app retrieves map data from HERE Vector Tiles Service. You need an `apikey` that you can generate yourself. Please see our [Getting Started Guide](../../docs/GettingStartedGuide.md).

## Usage

```sh
mkdir 3dmap-example
cd 3dmap-example
npx -p yo -p @here/generator-harp.gl yo @here/harp.gl
> package name 3dmap-example name:
```

This command will generate complete, clean project based on Node.js, Webpack, Typescript.
Set you access token in `View.ts`:

```typescript
const dataSource = new VectorTileDataSource({
    baseUrl: "https://vector.hereapi.com/v2/vectortiles/base/mc",
    authenticationCode: "YOUR-APIKEY"
});
```

Then start it using `webpack-dev-server`:

```sh
npm start
(...)
> 3dmap-example@1.0.0 start /home/user/generator-test
> webpack-dev-server

Project is running at http://localhost:8080/
```

Open `http://localhost:8080/` in your browser to see the running application.

## Generator Development & Testing

Automatic tests.

```sh
yarn test
```

Manual tests:

```sh
mkdir ~/generator-harp.gl-test #  create folder for test app
cd ~/generator-harp.gl-test
```

Now you can check how your working copy of generator works, by running this after each change:

```sh
yo ~/src/harp.gl/@here/generator-harp.gl/generators/app/ # generate app
npm install && npm run start
```
npm package: @here/harp-fetch
Description: This module adds a subset of the fetch API for Node.js
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-fetch

##Overview

This module adds a subset of the [fetch](https://harp-fetch.spec.whatwg.org/) API for [Node.js](https://nodejs.org/). This allows code written for the browser to also execute in `Node.js`.

The main goal of this module is to provide enough compatibility to allow running unit tests in `Node.js`. It is not 100% feature and behavior compatible with `fetch`.

The feature set is that of [node-fetch](https://www.npmjs.com/package/node-fetch) with the addition of a dummy `AbortController`.

## Usage

Import the module for its side-effects:

```JavaScript
import "@here/harp-fetch"
```

This adds `fetch` to the global `Node.js` namespace.

## Behavior in Browser Context

When this module is used in a browser context, it does nothing and adds no code.
npm package: @here/harp-geoutils
Description: Utility classes for working with geospatial data
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-geoutils

## Overview

This module contains utility classes for working with geospatial data.

It includes functionality for:

* [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)-compliant coordinates
* supporting tiling schemes, such as [Web Mercator](https://en.wikipedia.org/wiki/Web_Mercator_projection) or [HERE tile](https://developer.here.com/olp/documentation/data-user-guide/shared_content/topics/olp/concepts/partitions.html)
* supporting map projections, such as [Web Mercator](https://en.wikipedia.org/wiki/Web_Mercator_projection) or [Equirectangular](https://en.wikipedia.org/wiki/Equirectangular_projection)
* math utility functions for working with radians and degrees
npm package: @here/harp-lrucache
Description: LRU cache
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-lrucache

## Overview

This module provides a cache that evicts its items based on the
[least-recently-used (LRU)][https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)] policy.
npm package: @here/harp-map-controls
Description: Camera controller which implements a common default set of camera functionality in a map context.
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-map-controls

## Overview

This module provides MapControls and MapAnimations which implement a common default set of camera functionality in a map context.

### Using the MapAnimations

The MapAnimations can simply be added to the existing MapView. The animations should not start from
the beginning, but after a few seconds, so the MapView has time to load the data for the first tiles.
A timeOut of 2000ms should be fine for most situations.

### CameraRotationAnimation

For the CameraRotationAnimation, the
MapControls that may be employed to manipulate the view should also be passed in, so the camera
animation can pause during the manipulation.

```typescript
const camRot = new CameraRotationAnimation(this.mapView, this.mapControls,
    {
        axis: new THREE.Vector3(0, 0, 1),
        duration: (20. * 1000),
        endAngle: 720
    });

this.mapView.addEventListener("render", (event: RenderEvent) => {
    camRot.update();
})

camRot.start();
```

### CameraPanAnimation

The CameraPanAnimation is not connected to the MapControls. If moves along the specified path, while
the camera orientation is not changed, it may be animated independently.

```typescript
this.mapView.geoCenter = new GeoCoordinates(52.515276, 13.377689000000002, 8000);

const camPan = new CameraPanAnimation(this.mapView,
    {
        // low level flight above Berlin
        // duration: (40. * 1000),
        // geoCoordinates: [
        //     new GeoCoordinates(52.52006626, 13.40764352, 800),
        //     new GeoCoordinates(52.48094817, 13.3909456, 800),
        //     new GeoCoordinates(52.518611, 13.376111, 800)
        // ],

        // Longer lasting higher level flight above Germany and France.
        duration: (400. * 1000),
        geoCoordinates: [
            new GeoCoordinates(48.138137, 11.575682, 15000),
            new GeoCoordinates(50.93873, 6.95236, 10000),
            new GeoCoordinates(48.853190, 2.348585, 8000)
        ],

        repeat: Infinity,
        interpolation: InterpolationFunction.CatmullRom
    });

this.mapView.addEventListener("render", (event: RenderEvent) => {
    camPan.update();
})

camPan.start();
```
npm package: @here/harp-map-editor
Description: A simple online editor for harp.gl themes.
Author: HERE Europe B.V.
Latest version: 0.1.2

# @here/harp-map-editor [![Build Status](https://travis-ci.com/heremaps/harp-map-editor.svg?branch=master)](https://travis-ci.com/heremaps/harp-map-editor)

## Overview

### A simple online editor for harp.gl themes.

Allows you to create and edit existing themes.

The following features are currently available:
 - export and import of themes
 - live preview
 - style change
 - restore page state after page reload
 - default themes
 - code formatting
 - theme source code validation
 - code autocompletion
 - two window mode

When you run the editor, you should get something similar to the image shown below:

![Sample editor](editor.png)

## Development

### Prerequisites

-   **Node.js** - Please see [nodejs.org](https://nodejs.org/) for installation instructions.
-   **Yarn** - Optional. Please see [yarnpkg.com](https://yarnpkg.com/en/) for installation instructions.

### Download dependencies

Run:

```sh
npm install
```
or

```sh
yarn install
```

to download and install all required packages.

### Launch development server for harp.gl theme editor

Run:

```sh
yarn start
```

To launch `webpack-dev-server`. Open `http://localhost:8080/` in your favorite browser.

To build the editor run:

```sh
yarn build
```
The build result will be in `dist` folder.

## License

Copyright (C) 2017-2020 HERE Europe B.V.

See the [LICENSE](./LICENSE) file in the root of this project for license details.
npm package: @here/harp-map-theme
Description: Map themes
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-map-theme

## Overview

This module contains the themes used by `harp.gl`.
Inside the `resources` folder you will find

* json files containing the styles definition
* png file containing the atlas of icons to be used together with the style

### Inspiration for the Style

The [style](resources/berlin_tilezen_base.json) is called `berlin`, inspired by the vibrant city of [Berlin](https://en.wikipedia.org/wiki/Berlin), where most of the development of `harp.gl` is done.

The choice of colors from the city itself, [blue](https://en.wikipedia.org/wiki/File:Oberbaumbr%C3%BCcke_mit_U-Bahn.jpg) from the river Spree,
[green](https://en.wikipedia.org/wiki/File:Cityscape_Berlin.jpg) from the many parks and forests of the city and
yellow because of the color of the taxis and
[the public transport system](https://en.wikipedia.org/wiki/Berliner_Verkehrsbetriebe).

We provide two variants based on the same `berlin` theme, a [dark](resources/berlin_tilezen_night_reduced.json) one and a [reduced](resources/berlin_tilezen_night_reduced.json) one.
npm package: @here/harp-mapview
Description: Functionality needed to render a map.
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-mapview

## Overview

This module provides all the functionality needed to display a map, using most of the different
modules included in this repo. The list of features include, but is not limited to:

* handling data sources
* fog rendering
* picking on elements
* sky
* loading themes
* [[@docs/label-rendering|Label rendering (text and pois)]]
npm package: @here/harp-olp-utils
Description: HERE OLP utilities
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-olp-utils

## Overview

This module provides utilities to access data from [HERE Open Location
Platform](https://platform.here.com/).

## OlpCopyrightProvider
This is a custom copyright provider which retrieves JSON data with copyright coverage areas from
certain Open Location Platform layer.
npm package: @here/harp-omv-datasource
Description: HERE OMV Data source
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-omv-datasource

## Overview

This module provides the implementation of [HERE](https://www.here.com)'s
Optimized Map for Visualization (OMV) Datasource.

This format follows the [Vector Tile Specification](https://github.com/mapbox/vector-tile-spec/).
This JSON format contains geometries, such as points and lines that define polygons, labels,
such as road names or city names, and other kinds of data that are typically passed to a renderer to draw a map.

Each tile is encoded using [Protobuf](https://github.com/google/protobuf).

## REST Clients

### HERE Vector Tiles

REST service implemented with `APIFormat.HereV1` in `OmvRestClient.ts` if you want to use `AuthenticationTypeBearer` by default, if you want to use `APIKey` you can use `APIFormat.XYZOMV`.

You can find more about the different access methods [here](https://developer.here.com/documentation/authentication/dev_guide/index.html).

The HERE Vector Tile Service allows you to request tiles containing vector data
using content from the [HERE Open Location Platform](https://openlocation.here.com/).

HERE provides global coverage and updates the data continuously.
For more information about our map content, see the [HERE Map Content Guidelines](https://repo.platform.here.com/artifactory/open-location-platform-docs/Data_Specifications/HERE_Map_Content/).

### HERE XYZ

REST services implemented with `APIFormat.XYZMVT`, `APIFormat.XYZJson` and `APIFormat.XYZOMV` in `OmvRestClient.ts`.

The HERE XYZ Services offer three variants:

* MVT: offer [Open Street Map Data](https://www.openstreetmap.org) tiles in MVT Format.
* JSON: offer [Open Street Map Data](https://www.openstreetmap.org) tiles in JSON Format.
* OMV: offer HERE Data tiles in OMV Format. The data source is the same as in the [HERE Vector Tiles](#here-vector-tiles).

You can find more about the HERE XYZ Services [here](https://www.here.xyz/).

### Mapbox Vector Tiles

REST service implemented with `APIFormat.MapboxV7` in `OmvRestClient.ts`.

You can find more information [here](https://docs.mapbox.com/vector-tiles/reference/).

## Tom Tom Vector Tiles

You can find more information [here](https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile).

## Usage of REST APIs and authentication

It is not within the scope of `harp.gl` to provide credentials to all of the services implemented above, but following the links you can do it by yourself.
On our [Getting Started Guide](../../docs/GettingStartedGuide.md) there is more information about getting credentials for HERE Services.
npm package: @here/harp-terrain-datasource
Description: Datasource to render terrain data in quantized-mesh and terrarium formats with harp.gl
Author: HERE Europe B.V.
Latest version: 0.7.1

# harp.gl Terrain Datasource 

[![Build Status](https://travis-ci.com/heremaps/harp-terrain-datasource.svg?token=XqJjRxFbW25Pc73LNRB9&branch=master)](https://travis-ci.com/heremaps/harp-terrain-datasource)

The `harp.gl` Terrain Datasource is a module of [harp.gl](https://github.com/heremaps/harp.gl) to render terrain data encoded using [Quantized Mesh](https://github.com/AnalyticalGraphicsInc/quantized-mesh) or [Mapzen Terrarium](https://mapzen.com/documentation/terrain-tiles/formats/#terrarium).

The image below contains terrain with partially overlaid wireframe.

![Terrain with partially overlaid wireframe](./harp-terrain-datasource.png)

## About This Repository

This repository is organized in a `yarn workspace`.

## Installation

### In Node.js

The module is installable via yarn (or npm):

```sh
yarn add @here/harp-terrain-datasource
```

```sh
npm install @here/harp-terrain-datasource
```

## Development

### Prerequisites

-   **Node.js** - Please see [nodejs.org](https://nodejs.org/) for installation instructions
-   **Yarn** - Please see [yarnpkg.com](https://yarnpkg.com/en/) for installation instructions.

### Download dependencies

Run:

```sh
yarn install
```

to download and install all required packages and set up the yarn workspace.

### Example Application

The [./example](./example) folder contains source code of [the demo application](https://heremaps.github.io/harp-terrain-datasource/) of harp.gl with Terrain Datasource. See [example's README](./example/README.md).

If you want to learn more about the applications you can create, please check the [Getting Started Guide](docs/GettingStartedGuide.md).

### See Also

* [API Reference](docs/APIReference.md). Introduction to our API.

* [harp.gl](https://github.com/heremaps/harp.gl). 3D map rendering engine based on three.js.

* [TIN Terrain](https://github.com/heremaps/tin-terrain). CLI tool to generate quantized mesh and OBJ tiles out of raster data.

* [Quantized Mesh Viewer](https://github.com/heremaps/quantized-mesh-viewer). Tool for debuging quantized mesh tiles.

* [Quantized Mesh Decoder](https://github.com/heremaps/quantized-mesh-decoder). JavaScript implementation of quantized mesh format decoding.

## License

Copyright © 2017-2019 HERE Europe B.V.

See the [LICENSE](./LICENSE) file in the root of this project for license details about using `harp-terrain-datasource`.

For other use cases not listed in the license terms, please [contact us](https://developer.here.com/contact-us).
npm package: @here/harp-text-canvas
Description: SDF based text rendering for TypeScript
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-text-canvas

## Overview

`Harp-Text-Canvas` is a robust [Signed Distance Field (SDF)](https://en.wikipedia.org/wiki/Signed_distance_function) text rendering library for `three.js`. It
handles:

  * Proper typesetting.
  * Rich text styling.
  * Complex text layouts.
  * Simple Bidi text.
  * Multi-font SDF text rendering.
  * Both SDF and MSDF BMFont assets.
  * Custom SDF text rendering materials.
  * Render to texture.
npm package: @here/harp-theme-tools
Description: Tools for harp.gl-theme optimiziation.
Author: HERE Europe B.V.
Latest version: 0.28.0

# Package content - the tools

HARP theme tools are build in Node.js environment (see: https://nodejs.org) so you will
need to install some prerequisities to use them:

-   **Node.js**
-   java script package manager, for example **npm** which is distributed with Node.js or **yarn**.
-   **npx**, the npm package runner, that simplifies usage of CLI tools (in the newest versions of npm it is installed automatically).

There is currently one application in the package and it is distributed as a command line tools (CLI), thus after installing:

```
npm install harp-theme-tools
```

in directory of your choice you will have the following application available:

-   harp-theme-optimizer

You may simply launch it from you command line shell, using **npx**, adding **--help** option allows to see their short version of usage manual:

```
npx harp-theme-optimizer --help
```

# **harp-theme-optimizer**

When using a theme file that includes several other files via the extends syntax this will lead to multiple http requests.
To minimize the http requests for a production application the `harp-theme-optimizer` will combine all included files into one.
Additionaly whitespaces can be removed withe the `--minify` option.

```
npx harp-theme-optimizer --in 'my-theme-file.json' --minify
```
npm package: @here/harp-transfer-manager
Description: Provides a manager that orchestrates downloading URLs, particularly static map resources.
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-transfer-manager

## Overview

This module provides a download manager that orchestrates downloading URLs, particularly static map resources.

The module:

* limits the number of parallel concurrent downloads
* retries downloads on HTTP errors with increasing timeouts, which is the best practice for many content delivery platforms
* combines multiple JSON requests for the same URL to prevent downloading the same resource multiple times
* allows to override the default `fetch` function used for downloading URLs
npm package: @here/harp-utils
Description: Provides utilities: logging, debugging.
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-utils

## Overview

This module provides utility classes. Such as, but not limited to:

* logging
* caching
* URL resolving
* Simple Math

## Logger
Custom logger for writing messages to browser console or separate window.
Messages could be filtered by log names or completely disabled via URI parameters or UI.
Logger name is required and cannot be empty.

```javascript
import { LoggerManager, LogLevel } from '@here/harp-utils';

const loggerManager = LoggerManager.instance;

// Create named logger and configure it to Warn log level.
const logger: ILogger = loggerManager.create('my logger', {
    level: LogLevel.Warn
});

// Warning 'my logger: something' logged to output.
logger.warn('something...');

// Won't be logged because log level is 'warn'.
logger.log('not logged...');

// Now, message is logged.
logger.level = LogLevel.Log;
logger.log('logged...');

// Be good developer. Free resources after you done.
// Unregister logger from global registry.
loggerManager.dispose(logger);

```
npm package: @here/harp-vectortile-datasource
Description: HERE Vector Tile Data Source
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-vectortile-datasource

## Overview

This module provides the implementation of [HERE](https://www.here.com)'s
Optimized Map for Visualization (OMV) Datasource.

This format follows the [Vector Tile Specification](https://github.com/mapbox/vector-tile-spec/).
This JSON format contains geometries, such as points and lines that define polygons, labels,
such as road names or city names, and other kinds of data that are typically passed to a renderer to draw a map.

Each tile is encoded using [Protobuf](https://github.com/google/protobuf).

## REST Clients

### HERE Vector Tiles

REST service implemented with `APIFormat.HereV1` in `OmvRestClient.ts` if you want to use `AuthenticationTypeBearer` by default, if you want to use `APIKey` you can use `APIFormat.XYZOMV`.

You can find more about the different access methods [here](https://developer.here.com/documentation/authentication/dev_guide/index.html).

The HERE Vector Tile Service allows you to request tiles containing vector data
using content from the [HERE Open Location Platform](https://openlocation.here.com/).

HERE provides global coverage and updates the data continuously.
For more information about our map content, see the [HERE Map Content Guidelines](https://repo.platform.here.com/artifactory/open-location-platform-docs/Data_Specifications/HERE_Map_Content/).

### HERE XYZ

REST services implemented with `APIFormat.XYZMVT`, `APIFormat.XYZJson` and `APIFormat.XYZOMV` in `OmvRestClient.ts`.

The HERE XYZ Services offer three variants:

* MVT: offer [Open Street Map Data](https://www.openstreetmap.org) tiles in MVT Format.
* JSON: offer [Open Street Map Data](https://www.openstreetmap.org) tiles in JSON Format.
* OMV: offer HERE Data tiles in OMV Format. The data source is the same as in the [HERE Vector Tiles](#here-vector-tiles).

You can find more about the HERE XYZ Services [here](https://www.here.xyz/).

### Mapbox Vector Tiles

REST service implemented with `APIFormat.MapboxV7` in `OmvRestClient.ts`.

You can find more information [here](https://docs.mapbox.com/vector-tiles/reference/).

## Tom Tom Vector Tiles

You can find more information [here](https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile).

## Usage of REST APIs and authentication

It is not within the scope of `harp.gl` to provide credentials to all of the services implemented above, but following the links you can do it by yourself.
On our [Getting Started Guide](../../docs/GettingStartedGuide.md) there is more information about getting credentials for HERE Services.
npm package: @here/harp-webpack-utils
Description: harp.gl webpack utilities
Author: HERE Europe B.V.
Latest version: 0.28.0

# Harp.gl Webpack Utilities

## Usage

Install the webpack utilities into your project:

```shell
npm install --save-dev @here/harp-webpack-utils
```

Add the following lines to your `webpack.config.js`:

```javascript
const { addHarpWebpackConfig } = require("@here/harp-webpack-utils/scripts/HarpWebpackConfig");
const myConfig = {};
module.exports = addHarpWebpackConfig(
    myConfig,
    { mainEntry: "./index.js", decoderEntry: "./harp-gl-decoders.js", htmlTemplate: "./index.html" }
);
```

`myConfig` is your existing Webpack configuration. Configuration values in `myConfig` will override any values generated by `addHarpWebpackConfig`.
`./index.js` is the path to your main application code. Will be used as the entry point for the main application bundle. May be omitted if Webpack `entry` configuration is included in `myConfig`.
`./harp-gl-decoders.js` is the path to your decoder service. Will be used as the entry point for the web worker decoder bundle. If omitted no decoder bundle will be created.
`./index.html` is the path to your HTML template index page. May be omitted if HTML configuration is included in `myConfig`.
npm package: @here/harp-webtile-datasource
Description: WebTile Data source
Author: HERE Europe B.V.
Latest version: 0.28.0

# @here/harp-webtile-datasource

## Overview

This module provides functionality to access the
[HERE Map Tile API 2.1](https://developer.here.com/documentation/map-tile/topics/quick-start-map-tile.html).

This service is a maptiler that can be used to obtain tiles of fixed size and use them as a base map, for example,
to display satellite images.