Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup example assets #524

Merged
merged 33 commits into from
Dec 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9c84b59
chore: migrate BugReport example
KiwiKilian Nov 21, 2024
8782347
refactor: align GeoJSON imports
KiwiKilian Nov 21, 2024
e89406c
chore: migrate RestrictMapBounds example
KiwiKilian Nov 21, 2024
f4c0035
chore: migrate GetZoom example
KiwiKilian Nov 22, 2024
fb33c95
fix: expo android status bar color
KiwiKilian Nov 23, 2024
5be17ff
chore: simplify ShowMap example
KiwiKilian Nov 23, 2024
4dd9711
chore: cleanup more examples
KiwiKilian Nov 23, 2024
215e8bd
Merge branch 'main' into feat/typescript-examples
KiwiKilian Nov 28, 2024
96d8e69
style: fix linting
KiwiKilian Nov 28, 2024
a87d24f
fix: allow MapView and Images to have no children
KiwiKilian Nov 28, 2024
62dd347
docs: update changelog
KiwiKilian Nov 28, 2024
ba28f5d
Merge branch 'feat/optional-children' into feat/typescript-examples
KiwiKilian Nov 28, 2024
af415d2
Merge branch 'main' into feat/typescript-examples
KiwiKilian Nov 28, 2024
6b3053f
Merge branch 'main' into feat/typescript-examples
KiwiKilian Nov 28, 2024
6bd959a
chore: rename earthquakesData
KiwiKilian Nov 28, 2024
3e37439
chore: update earthquakes
KiwiKilian Nov 28, 2024
63539a5
chore: cleanup more assets
KiwiKilian Nov 28, 2024
1783087
chore: cleanup styles
KiwiKilian Nov 28, 2024
8a1c809
chore: use blue as expo splash backgroundColor
KiwiKilian Nov 29, 2024
064ff12
docs: new screenshots
KiwiKilian Nov 29, 2024
f6341d3
docs: resize screenshots
KiwiKilian Nov 29, 2024
61874d5
chore: remove duplicate example
KiwiKilian Nov 29, 2024
92142ef
chore: align example headings
KiwiKilian Nov 29, 2024
5163549
fix: use cover for splash
KiwiKilian Nov 29, 2024
9eb7a09
fix: bug report heading
KiwiKilian Nov 29, 2024
e25ffe5
Merge branch 'main' into feat/typescript-examples
KiwiKilian Dec 1, 2024
fd686ec
fix: keep plugin without build
KiwiKilian Dec 1, 2024
ece14e3
chore: further simplify examples
KiwiKilian Dec 1, 2024
0a235dd
chore: cleanup more examples
KiwiKilian Dec 1, 2024
c32923d
refactor: use sheet instead of styles
KiwiKilian Dec 2, 2024
e53c5a6
Merge branch 'beta' into feat/typescript-examples
KiwiKilian Dec 6, 2024
f8eaac4
docs: improve screenshot sizing
KiwiKilian Dec 6, 2024
797ed7b
Merge branch 'beta' into feat/typescript-examples
KiwiKilian Dec 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: migrate GetZoom example
  • Loading branch information
KiwiKilian committed Nov 22, 2024
commit f4c0035627d3ffe982f94ded49fd065f62e9bf9b
51 changes: 0 additions & 51 deletions packages/examples/src/examples/Camera/GetZoom.js

This file was deleted.

30 changes: 30 additions & 0 deletions packages/examples/src/examples/Camera/GetZoom.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import MapLibreGL from "@maplibre/maplibre-react-native";
import React, { useRef, useState } from "react";
import { Text } from "react-native";

import sheet from "../../styles/sheet";
import Bubble from "../common/Bubble";
import Page from "../common/Page";

export default function GetZoom() {
const [zoom, setZoom] = useState<number>();
const mapViewRef = useRef<MapLibreGL.MapViewRef>(null);

return (
<Page>
<MapLibreGL.MapView
ref={mapViewRef}
onRegionDidChange={async () => {
setZoom(await mapViewRef.current?.getZoom());
}}
style={sheet.matchParent}
>
<MapLibreGL.Camera />
</MapLibreGL.MapView>

<Bubble>
<Text>Zoom: {zoom}</Text>
</Bubble>
</Page>
);
}