All Projects β†’ heremaps β†’ harp-leaflet

heremaps / harp-leaflet

Licence: Apache-2.0 license
Leaflet plugin for harp.gl

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to harp-leaflet

Leaflet Example
πŸ—Ί An example of how to use Leaflet to create an interactive map.
Stars: ✭ 41 (+156.25%)
Mutual labels:  leaflet, leaflet-map, leafletjs
coronavirus-map-dashboard
🦠 Coronavirus (COVID-19) Map Dashboard using coronavirus-tracker-api
Stars: ✭ 41 (+156.25%)
Mutual labels:  maps, leaflet, leaflet-map
mapus
A map tool with real-time collaboration πŸ—ΊοΈ
Stars: ✭ 2,687 (+16693.75%)
Mutual labels:  maps, leaflet, leafletjs
Leaflet Cluster Example
πŸ—Ί Example of using the clustering plugin with Leaflet
Stars: ✭ 26 (+62.5%)
Mutual labels:  leaflet, leaflet-map, leafletjs
leaflet-locationpicker
Simple location picker on Leaflet map
Stars: ✭ 31 (+93.75%)
Mutual labels:  maps, leaflet-plugin, leafletjs
Ember Leaflet
πŸ”₯ πŸƒ Easy and declarative mapping for ember
Stars: ✭ 201 (+1156.25%)
Mutual labels:  maps, leaflet
Mapstore2
Modern webmapping with OpenLayers, Leaflet and React
Stars: ✭ 251 (+1468.75%)
Mutual labels:  maps, leaflet
echarty
Minimal R/Shiny Interface to ECharts.js
Stars: ✭ 49 (+206.25%)
Mutual labels:  maps, leaflet
leaflet-area-select
Control to just select an area and provide bbox for it
Stars: ✭ 27 (+68.75%)
Mutual labels:  leaflet, leaflet-plugins
Leaflet Swoopy
‡️ Swoopy Arrow Plugin for Leaflet
Stars: ✭ 52 (+225%)
Mutual labels:  maps, leaflet
rainviewer-api-example
How to use RainViewer API: simple HTML + JS code which render an animated weather radar overlay on the map
Stars: ✭ 56 (+250%)
Mutual labels:  leaflet, leafletjs
leaflet-defaulticon-compatibility
Retrieve all Leaflet Default Icon options from CSS, in particular all icon images URL's, to improve compatibility with bundlers and frameworks that modify URL's in CSS.
Stars: ✭ 71 (+343.75%)
Mutual labels:  leaflet, leaflet-plugins
Pinpoint
JavaScript library for creating beautifully simple maps in seconds
Stars: ✭ 83 (+418.75%)
Mutual labels:  maps, leaflet
Atlas Of Thrones
An interactive "Game of Thrones" map powered by Leaflet, PostGIS, and Redis.
Stars: ✭ 253 (+1481.25%)
Mutual labels:  maps, leaflet
Making Maps With React
🌐 Example React components for React-Leaflet, Pigeon Maps, React MapGL and more
Stars: ✭ 66 (+312.5%)
Mutual labels:  maps, leaflet
Leaflet.TileLayer.Fallback
Replaces missing Tiles by scaled lower zoom Tiles
Stars: ✭ 29 (+81.25%)
Mutual labels:  leaflet, leaflet-plugins
leaflet-layerJSON
Build dynamic JSON Layer via Ajax/JSONP with caching
Stars: ✭ 82 (+412.5%)
Mutual labels:  leaflet, leaflet-layer
geofind
Multiplayer Geographical Guessing Game using PostGIS, Nuxt, Leaflet & Colyseus.
Stars: ✭ 31 (+93.75%)
Mutual labels:  maps, leaflet
react-native-leaflet
A LeafletView component using WebView and Leaflet map for React Native applications
Stars: ✭ 53 (+231.25%)
Mutual labels:  leaflet, leaflet-map
Mapboard
A framework for data-rich web mapping πŸŒŽπŸ“Šβœ¨
Stars: ✭ 29 (+81.25%)
Mutual labels:  maps, leaflet

@here/harp-leaflet Build Status

Overview

A Leaflet plugin that adds harp.gl layer

This repository contains the code that can help you create a harp.gl layer inside Leaflet

"Hello world" example

Usage

Install harp-leaflet plugin

Run:

npm install @here/harp-leaflet

or

yarn install @here/harp-leaflet

to download and install harp-leaflet plugin package.

Add harp-leaflet to your Leaflet app

Add:

import { GeoCoordinates } from "@here/harp-geoutils";
import { APIFormat, OmvDataSource } from "@here/harp-omv-datasource";
import { HarpGL } from "harp-leaflet";
import * as L from "leaflet";

// 1. Initialize leaflet map
const map = L.map("map").setView([38.912753, -77.032194], 15);

// 2. (optional) Add Leaflet features you need
L.marker([38.912753, -77.032194])
    .bindPopup("Hello <b>Harp GL</b>!<br>Whoa, it works!")
    .addTo(map)
    .openPopup();

// 3. Add harp.gl layer to leaflet map
const harpGL = new HarpGL().addTo(map);

// 4. Initialize and add harp.gl datasources
const geoJsonDataSource = new OmvDataSource({
    baseUrl: "https://xyz.api.here.com/tiles/osmbase/512/all",
    apiFormat: APIFormat.XYZMVT,
    styleSetName: "here_olp",
    maxZoomLevel: 17,
    authenticationCode: "YOUR_AUTH_CODE",
    concurrentDecoderScriptUrl: "./build/decoder.bundle.js"
});

harpGL.mapView.addDataSource(geoJsonDataSource);

// 5. Point your view to the right place
harpGL.mapView.lookAt(new GeoCoordinates(16, -4, 0), 6000000);

Testing

harp-leaflet comes with basic integration tests that run in browser. To run tests in developer envrionment execute yarn start-tests --open which will serve test app in your default browser.

To run tests in "CI-like" mode, you need to first build them and run, both are separate steps:

$ yarn build-tests
$ yarn test

By default yarn test uses karma configured to run tests in local headless Chrome using karma-chrome-launcher.

License

Copyright (C) 2019-2021 HERE Europe B.V.

See the LICENSE file in the root of this project for license details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].