Skip to content

Commit

Permalink
docs: Docusaurus website (visgl#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Apr 11, 2023
1 parent d9544cc commit 8618a06
Show file tree
Hide file tree
Showing 240 changed files with 125,874 additions and 160 deletions.
6 changes: 2 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# vis.gl Project Template
# deck.gl-community

This is a template for vis.gl projects.

[Creating a repository from a template](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template)
This repository contains a collection of community supported modules for [deck.gl](https://deck.gl).
96 changes: 96 additions & 0 deletions docs/modules/bing-maps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Overview

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](https://deck.gl/docs/api-reference/core/deck) constructor. See the [limitations](#supported-features-and-limitations) section below for more details.

The following [Deck methods](https://deck.gl/docs/api-reference/core/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*`)
7 changes: 7 additions & 0 deletions docs/modules/bing-maps/table-of-contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "category",
"label": "deck.gl-bing-maps",
"items": [
"modules/bing-maps/README"
]
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Experimental Layouts

```css
<style>
.bg-white {
background: #aaa;
Expand Down Expand Up @@ -108,3 +109,4 @@
</div>
</div>
</div>
```
File renamed without changes.
File renamed without changes.
Empty file.
Binary file added docs/modules/graph-gl/images/edge-styles/flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/layouts/cola.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/layouts/d3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/layouts/ngraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/layouts/radial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/layouts/simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/layouts/vizjs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/graph-gl/images/radial-layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions docs/modules/graph-gl/table-of-contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"type": "category",
"label": "@deck.gl-community/graph-gl",
"items": [
"modules/graph-gl/README",
"modules/graph-gl/version-policy",
{
"type": "category",
"label": "GraphGL",
"items": [
"modules/graph-gl/api-reference/graphgl",
"modules/graph-gl/api-reference/node-style",
"modules/graph-gl/api-reference/edge-style",
"modules/graph-gl/api-reference/interactions",
"modules/graph-gl/api-reference/viewport",
"modules/graph-gl/api-reference/layout"
]
},
{
"type": "category",
"label": "Node style",
"items": [
"modules/graph-gl/api-reference/node-style-circle",
"modules/graph-gl/api-reference/node-style-rectangle",
"modules/graph-gl/api-reference/node-style-marker",
"modules/graph-gl/api-reference/node-style-label"
]
},
{
"type": "category",
"label": "Edge decorators",
"items": [
"modules/graph-gl/api-reference/edge-style-label",
"modules/graph-gl/api-reference/edge-style-flow"
]
},
{
"type": "category",
"label": "Layouts",
"items": [
"modules/graph-gl/api-reference/simple-layout",
"modules/graph-gl/api-reference/d3-layout"
]
},
{
"type": "category",
"label": "Core Data Structures",
"items": [
"modules/graph-gl/api-reference/graph",
"modules/graph-gl/api-reference/node",
"modules/graph-gl/api-reference/edge"
]
},
{
"type": "category",
"label": "Advanced",
"items": [
"modules/graph-gl/advanced/custom-layout",
"modules/graph-gl/advanced/gallery"
]
}
]
}
File renamed without changes.
25 changes: 0 additions & 25 deletions docs/table-of-contents.json

This file was deleted.

3 changes: 0 additions & 3 deletions modules/bing-maps/docs/README.md

This file was deleted.

108 changes: 0 additions & 108 deletions modules/graph-gl/docs/table-of-contents.json

This file was deleted.

Loading

0 comments on commit 8618a06

Please sign in to comment.