Skip to content

Commit

Permalink
[plugins/random] add id to feature title to distinguish points in lis…
Browse files Browse the repository at this point in the history
…t view
  • Loading branch information
restjohn committed Apr 19, 2024
1 parent 4029ea2 commit eaa0a4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/random/src/random.ts
Expand Up @@ -61,13 +61,13 @@ export class RandomConnection implements FeedServiceConnection {
typedParams.scatterDegrees * (Math.random() * 2 - 1) + latitude
]
const nextId = typedParams.randomOrder ? itemIds.splice(Math.trunc(Math.random() * itemIds.length), 1)[0] : itemIds.shift()
const titlePrefix = typeof params?.titlePrefix === 'string' ? params.titlePrefix : topic
const titlePrefix = typeof params?.titlePrefix === 'string' ? params.titlePrefix : 'Wut'
return {
type: 'Feature',
id: nextId,
properties: {
timestamp: new Date(),
title: `${titlePrefix} random point`
title: `${titlePrefix} random point ${nextId}`
},
geometry: {
type: 'Point',
Expand Down

0 comments on commit eaa0a4b

Please sign in to comment.