2.0.7 • Published 25 days ago

@2gis/deck2gis-layer v2.0.7

Weekly downloads
-
License
BSD-2-Clause
Repository
-
Last release
25 days ago

deck2gisLayer

Deck.gl layers implementations into 2gis map

Usage

Install with NPM

npm install @2gis/deck2gis-layer

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 docker:test 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 docker:test

Update screenshots

npm run docker:screenshot:update

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.
2.0.7

25 days ago

2.0.6

3 months ago

2.0.5

4 months ago

2.0.2-alpha

6 months ago

2.0.4-alpha

6 months ago

2.0.5-alpha

6 months ago

2.0.3-alpha

6 months ago

2.0.1-alpha

6 months ago

1.2.0

9 months ago

2.0.0-alpha-0.4

8 months ago

2.0.0-alpha-0.5

7 months ago

2.0.0-alpha-0.6

7 months ago

2.0.0-alpha-0.7

7 months ago

2.0.0-alpha-0.8

7 months ago

2.0.0-alpha-0.9

7 months ago

1.2.1

8 months ago

2.0.0-alpha-0.1

8 months ago

2.0.0-alpha-0.2

8 months ago

2.0.0-alpha-0.3

8 months ago

2.0.0

7 months ago

2.0.0-alpha-0.10

7 months ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.10

1 year ago

1.1.1

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.9.0

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago