has issues
This commit is contained in:
parent
2e112d7398
commit
c645b0f1d4
96 changed files with 2147083 additions and 5787 deletions
|
|
@ -3,7 +3,7 @@ import type { PickingInfo } from '@deck.gl/core';
|
|||
import { IconLayer, ScatterplotLayer, TextLayer } from '@deck.gl/layers';
|
||||
import Supercluster from 'supercluster';
|
||||
|
||||
import type { POI } from '../types';
|
||||
import type { POI, SchoolMetadata } from '../types';
|
||||
import {
|
||||
POI_GROUP_COLORS,
|
||||
MINOR_POI_CATEGORIES,
|
||||
|
|
@ -24,6 +24,7 @@ export interface PopupInfo {
|
|||
id: string;
|
||||
isCluster?: boolean;
|
||||
clusterCount?: number;
|
||||
school?: SchoolMetadata;
|
||||
}
|
||||
|
||||
interface ClusterPoint {
|
||||
|
|
@ -60,7 +61,7 @@ function getPoiGroupColor(group: string): [number, number, number] {
|
|||
}
|
||||
|
||||
function getPoiIconSize(poi: POI): number {
|
||||
return hasBundledPoiLogo(poi) ? 24 : 18;
|
||||
return hasBundledPoiLogo(poi) ? 14 : 11;
|
||||
}
|
||||
|
||||
export function usePoiLayers({ pois, zoom, isDark }: UsePoiLayersProps) {
|
||||
|
|
@ -77,6 +78,7 @@ export function usePoiLayers({ pois, zoom, isDark }: UsePoiLayersProps) {
|
|||
group: info.object.group,
|
||||
emoji: info.object.emoji,
|
||||
id: info.object.id,
|
||||
school: info.object.school,
|
||||
});
|
||||
} else {
|
||||
setPopupInfo(null);
|
||||
|
|
@ -162,7 +164,7 @@ export function usePoiLayers({ pois, zoom, isDark }: UsePoiLayersProps) {
|
|||
id: 'poi-shadow',
|
||||
data: visiblePois,
|
||||
getPosition: (d) => [d.lng, d.lat],
|
||||
getRadius: (d) => (hasBundledPoiLogo(d) ? 0 : 16),
|
||||
getRadius: (d) => (hasBundledPoiLogo(d) ? 0 : 10),
|
||||
radiusUnits: 'pixels',
|
||||
getFillColor: isDark ? [0, 0, 0, 50] : [0, 0, 0, 25],
|
||||
pickable: false,
|
||||
|
|
@ -177,7 +179,7 @@ export function usePoiLayers({ pois, zoom, isDark }: UsePoiLayersProps) {
|
|||
id: 'poi-background',
|
||||
data: visiblePois,
|
||||
getPosition: (d) => [d.lng, d.lat],
|
||||
getRadius: (d) => (hasBundledPoiLogo(d) ? 24 : 14),
|
||||
getRadius: (d) => (hasBundledPoiLogo(d) ? 14 : 8),
|
||||
radiusUnits: 'pixels',
|
||||
getFillColor: (d) =>
|
||||
hasBundledPoiLogo(d)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue