Skip to content

Commit

Permalink
feat(@dpc-sdp/ripple-ui-maps): add clustering distance optional prop,…
Browse files Browse the repository at this point in the history
… default as current
  • Loading branch information
bgilhome-now committed Aug 13, 2024
1 parent 3a3080b commit ed81faa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ripple-ui-maps/src/components/map/RplMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ interface Props {
hasSidePanel?: boolean
noresults?: boolean
getFeatureTitle?: (feature: any) => string
clusteringDistance?: number
}
const props = withDefaults(defineProps<Props>(), {
Expand All @@ -75,7 +76,8 @@ const props = withDefaults(defineProps<Props>(), {
return ic
},
noresults: false,
getFeatureTitle: (feature: any) => (feature ? feature.title : '')
getFeatureTitle: (feature: any) => (feature ? feature.title : ''),
clusteringDistance: 100
})
const zoom = ref(props.initialZoom)
Expand Down Expand Up @@ -365,7 +367,7 @@ const noResultsRef = ref(null)
<ol-animated-clusterlayer
title="clusterLayer"
:animationDuration="300"
:distance="100"
:distance="clusteringDistance"
:zIndex="4"
>
<ol-source-vector :features="mapFeatures"> </ol-source-vector>
Expand Down

0 comments on commit ed81faa

Please sign in to comment.