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

@2gis/deck2gis-layer

v2.0.9

Published

Deck.gl layers implementations into 2gis map

Downloads

715

Readme

deck2gisLayer

Deck.gl layers implementations into 2gis map

Usage

Install with NPM

npm install @2gis/deck2gis-layer

Important

The current version of the Deck2gisLayer plugin is only compatible with the deck.gl@^8

Use # deck2gisLayer

Import the deck2gisLayer plugin to your project and use it:

import { Deck2gisLayer, initDeck } from '@2gis/deck2gis-layer';
// Init mapgl
const map = new mapgl.Map('container', {
    center: [55.31878, 25.23584],
    zoom: 13,
    key: 'Your API access key',
});
// Init deck.gl
const deck = initDeck(map, Deck, { antialiasing: 'msaa' });

// create Deck2gisLayer
const layer = new Deck2gisLayer<HexagonLayer<any>>({
    id: 'deckgl-HexagonLayer',
    deck,
    type: HexagonLayer,
    data,
    antialiasing: true,
    parameters: { depthTest: true },
    radius: 480,
    getPosition: (d: any) => [d.point.lon, d.point.lat],
});

// add deck layer into map
 map.addLayer(deckLayer);

Contributing

Deck2gisLayer uses github-flow to accept & merge fixes and improvements. Basic process is:

  • Fork the repo.
  • Create a branch.
  • Add or fix some code.
  • Run testing suite with npm run test:screenshots and make sure nothing is broken
  • Add some tests for your new code or fix broken tests.
  • Commit & push.
  • Create a new pull request to original repo.

Pull requests with failing tests will not be accepted. Also, if you modify packages or add them to package.json, make sure you use npm and update package-lock.json.

Tests

Run tests

npm run test:screenshots

Release

npm

  1. Update the package version by running npm version patch|minor|major. This command returns a new package version. Let assume it's 1.2.3
  2. Push changes to github and merge them to the «master» branch
  3. Go to https://github.com/2gis/deck2gisLayer/releases/new
  4. Click the «Choose tag» button and create a new tag according to the version in package.json, for example v1.2.3
  5. Make sure the release target is the «master» branch
  6. Paste the release tag into the «Release title» field, for example v1.2.3
  7. Add a release description
  8. Click the «Publish release» button
  9. Go to https://github.com/2gis/deck2gisLayer/actions and wait for completing the release workflow

Demo

  1. Just execute npm run deploy-gh-pages on your local machine from a commit you want to deploy as a demo.