Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Oct 15, 2023
1 parent 8f53616 commit 04cae31
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/modules/mvt/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Overview

The `@loaders.gl/mvt` module handles the [Mapbox Vector Tile](./formats/mapbox-vector-tile) format, a protobuf-encoded format that defines geospatial geometries.
The `@loaders.gl/mvt` module handles the [Mapbox Vector Tile](./formats/mvt) format, a protobuf-encoded format that defines geospatial geometries.

The modules also provides a `GeoJSONTiler` class that can serve up equivalent parsed
tiles from an in-memory `GeoJSON` file.
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/mvt/api-reference/tilejson-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `PMTilesLoader` parses header/metadata from a pmtiles archive
| --------------------- | -------------------------------------------------- |
| File Extension | `.json` |
| File Type | Text |
| File Format | [TileJSON](/docs/modules/pmtiles/formats/tilejson) |
| File Format | [TileJSON](/docs/modules/mvt/formats/tilejson) |
| Data Format | TileJSON |
| Decoder Type | Synchronous |
| Worker Thread Support | No |
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/pmtiles/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @loaders.gl/pmtiles

Support for loading [pmtiles](./format/pmtiles) format tiles.
Support for loading [pmtiles](./formats/pmtiles) format tiles.
2 changes: 1 addition & 1 deletion docs/modules/pmtiles/api-reference/pmtiles-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `PMTilesSource` reads individual tiles from a PMTiles archive file.
| --------------------- | ----------------------------------------------- |
| File Extension | `.pmtiles` |
| File Type | Binary Archive |
| File Format | [PMTiles](/docs/modules/pmtiles/format/pmtiles) |
| File Format | [PMTiles](/docs/modules/pmtiles/formats/pmtiles) |
| Data Format | Metadata |
| Decoder Type | Asynchronous |
| Worker Thread Support | No |
Expand Down
2 changes: 1 addition & 1 deletion docs/whats-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ A major release that brings:

**@loaders.gl/pmtiles** - NEW

- New [`PMTilesSource`](/docs/modules/pmtiles/api-reference/pmtiles-service) supports the [PMTiles](/docs/modules/pmtiles/formats/pmtiles) format.
- New [`PMTilesSource`](/docs/modules/pmtiles/api-reference/pmtiles-source) supports the [PMTiles](/docs/modules/pmtiles/formats/pmtiles) format.
- New [PMTiles example](/examples/pmtiles).

**@loaders.gl/parquet**
Expand Down
5 changes: 4 additions & 1 deletion examples/website/3d-tiles/examples.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

import {fetchFile} from '@loaders.gl/core';

const DECK_DATA_URI = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master';
const ION_TOKEN =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3NjEwMjA4Ni00YmVkLTQyMjgtYjRmZS1lY2M3ZWFiMmFmNTYiLCJpZCI6MjYxMzMsImlhdCI6MTY3NTM2ODY4NX0.chGkGL6DkDNv5wYJQDMzWIvi9iDoVa27dgng_5ARDmo';
Expand Down Expand Up @@ -93,7 +96,7 @@ const SHOWCASE_EXAMPLES = {

export async function loadExampleIndex() {
// Load the index file that lists example tilesets (from the loaders.gl github repo)
const response = await fetch(EXAMPLE_INDEX_URL);
const response = await fetchFile(EXAMPLE_INDEX_URL);
const testExamples = await response.json();

// We don't yet support geometry and vector tiles, so remove those categories for now
Expand Down
5 changes: 4 additions & 1 deletion examples/website/gltf/components/examples.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

import {fetchFile} from '@loaders.gl/core';

export const GLTF_BASE_URL =
'https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/';
export const GLTF_MODEL_INDEX = `${GLTF_BASE_URL}model-index.json`;
Expand All @@ -11,7 +14,7 @@ const GLTF_FIGHT_HELMET_URL =
'https://raw.githubusercontent.com/visgl/deck.gl-data/master/formats/gltf/KHR_texture_basisu/FlightHelmet/FlightHelmetUastc.gltf';

export async function loadModelList() {
const models = await fetch(GLTF_MODEL_INDEX).then((res) => res.json());
const models = await fetchFile(GLTF_MODEL_INDEX).then((res) => res.json());
models.push({
name: 'FightHelmet',
url: GLTF_FIGHT_HELMET_URL,
Expand Down
4 changes: 2 additions & 2 deletions examples/website/i3s/src/app-debug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import {LineLayer, ScatterplotLayer} from '@deck.gl/layers';
import {TerrainLayer, Tile3DLayer} from '@deck.gl/geo-layers';

import {load} from '@loaders.gl/core';
import {load, fetchFile} from '@loaders.gl/core';
import {I3SLoader, I3SBuildingSceneLayerLoader} from '@loaders.gl/i3s';
import {ImageLoader} from '@loaders.gl/images';
import {StatsWidget} from '@probe.gl/stats-widget';
Expand Down Expand Up @@ -308,7 +308,7 @@ export default class App extends PureComponent {
const {tilesetUrl, token, name, metadataUrl} = params;
this.setState({tilesetUrl, name, token, sublayers: []});
this.handleClearWarnings();
const metadata = await fetch(metadataUrl).then((resp) => resp.json());
const metadata = await fetchFile(metadataUrl).then((resp) => resp.json());
const flattenedSublayers = await this.getFlattenedSublayers(tilesetUrl);
this.setState({metadata, tileInfo: null, normalsDebugData: [], flattenedSublayers});
this._loadedTilesets = [];
Expand Down
9 changes: 6 additions & 3 deletions examples/website/i3s/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled from 'styled-components';

import {Map} from 'react-map-gl';
import maplibregl from 'maplibre-gl';
import {lumaStats} from '@luma.gl/core';

import DeckGL from '@deck.gl/react';
import {
MapController,
Expand All @@ -17,13 +17,16 @@ import {TerrainLayer, Tile3DLayer} from '@deck.gl/geo-layers';
import {I3SLoader, I3SBuildingSceneLayerLoader, loadFeatureAttributes} from '@loaders.gl/i3s';
import {StatsWidget} from '@probe.gl/stats-widget';

import {lumaStats} from '@luma.gl/core';
import {load, fetchFile} from '@loaders.gl/core';


import ControlPanel from './components/control-panel';
import AttributesPanel from './components/attributes-panel';
import {parseTilesetUrlFromUrl, parseTilesetUrlParams} from './utils/url-utils';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faSpinner} from '@fortawesome/free-solid-svg-icons';
import {Color, Flex, Font} from './components/styles';
import {load} from '@loaders.gl/core';
import {buildSublayersTree} from './helpers/sublayers';
import {initStats, sumTilesetsStats} from './helpers/stats';
import {getElevationByCentralTile} from './helpers/terrain-elevation';
Expand Down Expand Up @@ -195,7 +198,7 @@ class App extends PureComponent {
const params = parseTilesetUrlParams(tileset.url, tileset);
const {tilesetUrl, token, name, metadataUrl} = params;
this.setState({tilesetUrl, name, token, sublayers: []});
const metadata = await fetch(metadataUrl).then((resp) => resp.json());
const metadata = await fetchFile(metadataUrl).then((resp) => resp.json());
const flattenedSublayers = await this.getFlattenedSublayers(tilesetUrl);
this.setState({metadata, selectedFeatureAttributes: null, flattenedSublayers});
this._loadedTilesets = [];
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"not dead"
],
"volta": {
"node": "16.19.1",
"node": "18.18.2",
"yarn": "1.22.19"
}
}
6 changes: 3 additions & 3 deletions website/src/examples-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
type: 'category',
label: '3D Tile Loaders',
items: [
'i3s',
'i3s-debug',
'i3s-arcgis',
// 'i3s',
// 'i3s-debug',
// 'i3s-arcgis',
'3d-tiles'
]
},
Expand Down
File renamed without changes.

0 comments on commit 04cae31

Please sign in to comment.