Skip to content

Commit

Permalink
docs: update example 📃
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
  • Loading branch information
vinayakkulkarni committed May 9, 2023
1 parent 86a2cf9 commit 8bd6606
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
8 changes: 4 additions & 4 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"maplibre-gl": "^2.4.0",
"maplibre-gl-interpolate-heatmap": "^0.0.0"
"maplibre-gl-interpolate-heatmap": "^0.0.1"
},
"devDependencies": {
"@types/node": "^20.1.1",
Expand Down
15 changes: 12 additions & 3 deletions example/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@ map.dragRotate.disable();
map.touchZoomRotate.disableRotation();

map.on('load', async () => {
map.addControl(new maplibregl.FullscreenControl(), 'top-right');
map.addControl(new maplibregl.NavigationControl(), 'bottom-right');
map.addControl(new maplibregl.ScaleControl(), 'bottom-left');
map.addControl(
new maplibregl.FullscreenControl({ container: map.getCanvasContainer() }),
'top-right',
);
map.addControl(
new maplibregl.NavigationControl({ visualizePitch: true }),
'bottom-right',
);
map.addControl(
new maplibregl.ScaleControl({ unit: 'metric' }),
'bottom-left',
);
const startingLatitude = -80;
const startingLongitude = -180;
const endingLatitude = 80;
Expand Down
2 changes: 1 addition & 1 deletion example/src/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'mapbox-gl/dist/mapbox-gl.css';
@import 'maplibre-gl/dist/maplibre-gl.css';

:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
Expand Down

0 comments on commit 8bd6606

Please sign in to comment.