Skip to content

Commit

Permalink
[feat] Use smaller points at much higher zooms
Browse files Browse the repository at this point in the history
  • Loading branch information
TetraTsunami committed Nov 11, 2024
1 parent 375f160 commit 6d37d65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/layers/IncidentLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const IncidentLayer = forwardRef<any, IncidentLayerProps>(
// Map of types to colors (normally only categories have an associated color).
const typeColors = Object.fromEntries(Object.entries(data?.Types || {}).map(([id, type]) => [id, data.Categories[type.categoryID].color]))

const markerSize = (id: string): PointTuple => (id == selectedIncidentID ? [20, 20] : zoomLevel > 7 ? [15, 15] : [10, 10])
const markerSize = (id: string): PointTuple => (id == selectedIncidentID ? [20, 20] : zoomLevel > 12 ? [15, 15] : [10, 10])

const markerSVG = (id: string, incident: Incident): string => {
const size = markerSize(id)[0]
Expand Down

0 comments on commit 6d37d65

Please sign in to comment.