Skip to content

Commit

Permalink
make it clearer that the added protocol is for PMTiles only
Browse files Browse the repository at this point in the history
  • Loading branch information
prusswan committed Jan 24, 2025
1 parent f8b48ed commit 28794e9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/MapMaplibreGl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class MapMaplibreGlInternal extends React.Component<MapMaplibreGlInternalProps,
inspect: null,
geocoder: null,
zoomControl: null,
protocol: new Protocol({metadata: true})
pmtilesProtocol: new Protocol({metadata: true})

Check failure on line 98 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build artifacts

Object literal may only specify known properties, and 'pmtilesProtocol' does not exist in type 'Readonly<MapMaplibreGlState>'.

Check failure on line 98 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build on ubuntu-latest

Object literal may only specify known properties, and 'pmtilesProtocol' does not exist in type 'Readonly<MapMaplibreGlState>'.

Check failure on line 98 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build on windows-latest

Object literal may only specify known properties, and 'pmtilesProtocol' does not exist in type 'Readonly<MapMaplibreGlState>'.

Check failure on line 98 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build on macos-latest

Object literal may only specify known properties, and 'pmtilesProtocol' does not exist in type 'Readonly<MapMaplibreGlState>'.
}
i18next.on('languageChanged', () => {
this.forceUpdate();
Expand Down Expand Up @@ -166,8 +166,7 @@ class MapMaplibreGlInternal extends React.Component<MapMaplibreGlInternalProps,
localIdeographFontFamily: false
} satisfies MapOptions;

const protocol = this.state.protocol;
MapLibreGl.addProtocol("pmtiles", protocol!.tile);
MapLibreGl.addProtocol("pmtiles", this.state.pmtilesProtocol.tile);

Check failure on line 169 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build artifacts

Property 'pmtilesProtocol' does not exist on type 'Readonly<MapMaplibreGlState>'.

Check failure on line 169 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build on ubuntu-latest

Property 'pmtilesProtocol' does not exist on type 'Readonly<MapMaplibreGlState>'.

Check failure on line 169 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build on windows-latest

Property 'pmtilesProtocol' does not exist on type 'Readonly<MapMaplibreGlState>'.

Check failure on line 169 in src/components/MapMaplibreGl.tsx

View workflow job for this annotation

GitHub Actions / build on macos-latest

Property 'pmtilesProtocol' does not exist on type 'Readonly<MapMaplibreGlState>'.

const map = new MapLibreGl.Map(mapOpts);

Expand Down

0 comments on commit 28794e9

Please # to comment.