Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
eyr1n committed Sep 19, 2024
1 parent b038e0e commit 989f659
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/GikadaiMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ currentPositionFeature.setStyle(
}),
);

const accuracyFeature = new Feature();

export function GikadaiMap({
onClick,
geolocation,
Expand All @@ -101,6 +103,10 @@ export function GikadaiMap({
);
});

geolocation.on('change:accuracyGeometry', () => {
accuracyFeature.setGeometry(geolocation.getAccuracyGeometry() ?? undefined);
});

useEffect(() => {
const map = new OlMap({
controls: [],
Expand Down Expand Up @@ -179,7 +185,7 @@ export function GikadaiMap({
}),
new VectorLayer({
source: new VectorSource({
features: [currentPositionFeature],
features: [accuracyFeature, currentPositionFeature],
}),
}),
],
Expand Down

0 comments on commit 989f659

Please sign in to comment.