Skip to content

Commit 9c25ffe

Browse files
committed
Reprioritise styles
1 parent 7877010 commit 9c25ffe

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/components/GoogleMap.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@ export interface Coordinates {
99
}
1010

1111
// Tune which points of interest show, so venues relevant to a Code Club stand
12-
// out. Google groups POIs into a fixed set of categories: we keep the civic ones
12+
// out. Google groups POIs into a fixed set of categories. We keep the civic ones
1313
// (schools, places of worship, parks, and "government" — which covers libraries,
14-
// community centres and town halls) and hide commercial clutter.
14+
// community centres and town halls) at full prominence, and show the rest
15+
// "simplified" so they still appear but yield to the civic venues when labels
16+
// collide in busy areas.
1517
const POI_MAP_STYLES: google.maps.MapTypeStyle[] = [
16-
{ featureType: 'poi.business', stylers: [{ visibility: 'off' }] },
17-
{ featureType: 'poi.attraction', stylers: [{ visibility: 'off' }] },
18-
{ featureType: 'poi.sports_complex', stylers: [{ visibility: 'off' }] },
18+
// Priority venues — full prominence.
1919
{ featureType: 'poi.school', stylers: [{ visibility: 'on' }] },
2020
{ featureType: 'poi.government', stylers: [{ visibility: 'on' }] },
2121
{ featureType: 'poi.place_of_worship', stylers: [{ visibility: 'on' }] },
2222
{ featureType: 'poi.park', stylers: [{ visibility: 'on' }] },
23+
// Everything else — still shown, but de-emphasised.
24+
{ featureType: 'poi.business', stylers: [{ visibility: 'simplified' }] },
25+
{ featureType: 'poi.attraction', stylers: [{ visibility: 'simplified' }] },
26+
{ featureType: 'poi.medical', stylers: [{ visibility: 'simplified' }] },
27+
{ featureType: 'poi.sports_complex', stylers: [{ visibility: 'simplified' }] },
2328
]
2429

2530
interface GoogleMapProps {

0 commit comments

Comments
 (0)