Skip to content

Commit

Permalink
docs: Continued docs cleanup (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Apr 15, 2024
1 parent 7849819 commit b39b2b9
Show file tree
Hide file tree
Showing 22 changed files with 472 additions and 536 deletions.
32 changes: 19 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# Community Modules
# Introduction

This repository contains a collection of community supported modules for [deck.gl](https://deck.gl).
This repository contains a collection of community supported modules for [deck.gl](https://deck.gl), that are intended to complement the various modules already provided by the core deck.gl framework. While any module that is properly scoped and of sufficient value to the community could be a candidate for this repository, common modules type are:

The modules in this repository are intended to be used together with deck.gl.
- additional **layer packs** (beyond the various layer packs available in deck.gl)
- additional **base map** integrations (beyond the integrations supported by deck.gl)
- additional **react** bindings (beyond the `@deck.gl/react` module).

Note that these modules are not officially supported by the deck.gl team, but have at least some part-time support from one or more community members.
## Support

## Incubation
Community modules are not officially supported by the core deck.gl maintainers, but have at least some intermittent, part-time support from one or more community members.

There is a high bar when adding new code to themain deck.gl repository. The deck.gl-community repository is sometimes used to prepare (incubate) new software components so that they are ready to be added to deck.gl.
Note that the continued inclusion of each module into this repository depends to a large extent on whether there is sufficient community support for the module. Modules can be removed from this repository if the core deck.gl team feels that the community is no longer able to provide sufficient support.

When proposing the addition of a new component, such as a new deck.gl layer,
to the core deck.gl maintainers, it is helpful to be able to prepare the component together with tests, documentation and examples outside of the core repository but within a similar code environment.
If a module was to be removed, applications can of course copy the module's source code, but will need to maintain the code on their own.

To be clear, many components in this repository are not intended to be added to the main deck.gl repository.
## Contributing

## Longevity
If you have a module that you think could fit into this repository, please start by opening a GitHub issue to start a discussion, or reach out in the OpenJS slack.

The continued inclusion of each module into this repository depends to a large extent on whether there is sufficient community interest in supporting the module. Modules can be removed if the core deck.gl team feels that there is no longer sufficient support.
## Upstreaming

## Contributing a module
On rare occasions, a new component or module may be "upstreamed" into the core deck.gl repository.

If you have a module that you think could fit into this repository, open an issue or PR and start a discussion, or reach out in the OpenJS slack.
There is a high bar when adding new code to the main deck.gl repository. The deck.gl-community repository is sometimes used to prepare (incubate) new software components so that they are ready to be added to deck.gl.

Therefore when proposing the addition of a new component (such as a new deck.gl layer),
to the core deck.gl maintainers, it is helpful to be able to prepare the component in a monorepo environment that is similar to the deck.gl repo, complete with tests, documentation and examples. This can avoid a length and frustrating review process in the deck.gl repo.

To set expectations, most components in this repository will never be added to the main deck.gl repository.
92 changes: 0 additions & 92 deletions docs/modules/bing-maps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,3 @@

This module allows [deck.gl](https://deck.gl) to be used as a Bing Maps custom layer.

## Installation

```bash
npm install deck.gl deck.gl-bing-maps
```

## Usage

```js
import {loadModules} from 'deck.gl-bing-maps';
import {GeoJsonLayer} from 'deck.gl';

loadModules().then(({Maps, Location, DeckOverlay}) => {
// Create map
const map = new Map(document.getElementById('map'), {
credentials: 'YOUR_API_KEY',
// Disable modes that are not supported
disableBirdsEye: true,
disableStreetside: true
});

map.setView({
center: new Location(37.78, -122.45),
zoom: 10
});

// Add deck.gl overlay
const deckOverlay = new DeckOverlay({
layers: [
new GeoJsonLayer({
data:
'https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_admin_0_scale_rank.geojson',
lineWidthMinPixels: 2,
getLineColor: [60, 60, 60],
getFillColor: [200, 200, 200]
})
]
});
map.layers.insert(deckOverlay);
});
```

## API Reference

### loadModules

`loadModules(moduleNames)`

Arguments:

- `moduleNames` (`string[]?`) - Optional modules to load, e.g. `'Microsoft.Maps.GeoJson'`, `'Microsoft.Maps.DrawingTools'`

Returns a Promise that resolves to the global `Microsoft.Maps` namespace. A custom class, `DeckOverlay`, is also added to the namespace.

### DeckOverlay

An implementation of [CustomOverlay](https://docs.microsoft.com/en-us/bingmaps/v8-web-control/map-control-api/customoverlay-class).

```js
const deckOverlay = new DeckOverlay({...});
map.layers.insert(deckOverlay);
```

The constructor accepts a props object that is passed to the `Deck` constructor. See the [limitations](#supported-features-and-limitations) section below for more details.

The following `Deck` methods can be called directly from a `DeckOverlay` instance:

- `deckOverlay.setProps`
- `deckOverlay.pickObject`
- `deckOverlay.pickMultipleObjects`
- `deckOverlay.pickObjects`
- `deckOverlay.redraw`
- `deckOverlay.finalize`

## Supported Features and Limitations

Supported deck.gl features:

- Layers
- Effects
- Auto-highlighting
- Attribute transitions
- `onHover` and `onClick` callbacks
- Tooltip

Not supported features:

- Tilting
- Multiple views
- Controller
- React integration
- Gesture event callbacks (e.g. `onDrag*`)
2 changes: 1 addition & 1 deletion docs/modules/bing-maps/api-reference/deck-overlay.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## API Reference
# DeckOverlay

### loadModules

Expand Down
34 changes: 19 additions & 15 deletions docs/modules/editable-layers/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
# Overview

![deck.gl v9](https://img.shields.io/badge/deck.gl-v9-green.svg?style=flat-square")
![WebGPU not supported](https://img.shields.io/badge/webgpu-no-red.svg?style=flat-square")

Provides editable and interactive map overlay layers, built using the power of [deck.gl](https://deck.gl/).

History
## Design Goals

`@deck.gl-community/editable-layers` aspires to be an ultra-performant, fully 3D-enabled GeoJSON editing system primarily focused on geospatial editing use cases.

- Maximal rendering and editing performance.
- Editing at 60fps (e.g. dragging sub objects) in GeoJSON payloads with 100K features (points, lines or polygons).
- Handle GeoJSON corner cases (e.g. automatically changing object types from `Polygon` to `MultiPolygon` when addition polygons are added).
- Fully 3D enabled (Can use WebGL z-buffer so that lines being rendered are properly occluded by other geometry).
- Seamless integration with deck.gl, allowing for GeoJSON editing to be interleaved with rich 3D visualizations.
- Handle event handling, including touch screen support.

## History

A fork of @nebula.gl. nebula.gl is an important part of the deck.gl ecosystem but the repository has lacked maintainers for several years and the repository no longer accepts external contributions.

# What's New
## What's New

This page contains highlights of each `editable-layers` release.

## editable-layers v9.0

### editable-layers v9.0

- The code has been updated to work with deck.gl v9.
- The module structure has been simplified via the module mapping in the table below.
Expand All @@ -26,21 +39,12 @@ This page contains highlights of each `editable-layers` release.
| `react-map-gl-draw` | Non-deck-wrapper | => NOT FORKED |


Release date: TBD
### editable-layers v0.0.1

### Draw Rectangle From Center Mode
Release date: TBD

- new `DrawRectangleFromCenterMode`. User can draw a new rectangular `Polygon` feature by clicking the center, then along a corner of the rectangle.

### Translate mode

- `screenSpace` option can be provided in the `modeConfig` of Translate mode so the features will be translated without distortion in screen space.

### Modify mode

- `lockRectangles` option can be provided in the `modeConfig` object for ModifyMode, so the features with `properties.shape === 'Rectangle'` will preserve rectangular shape.

### EditableGeojsonLayer

- `pickingLineWidthExtraPixels` property to specify additional line width in pixels for picking. Can be useful when `EditableGeojsonLayer` is over a deck.gl layer and precise picking is problematic, and when usage of `pickingDepth` introduces performance issues.

Loading

0 comments on commit b39b2b9

Please sign in to comment.