wp-plugin-trackserver icon indicating copy to clipboard operation
wp-plugin-trackserver copied to clipboard

[feature request] Delay live updates by set time

Open jdetmold opened this issue 4 years ago • 8 comments

A nice feature would be an addition to the shortcode for delay = 3d, this could ignore any updates within the past 3d allowing a privacy window for publicly posting location.

jdetmold avatar Jan 16 '21 05:01 jdetmold

Just to make sure I understand: you want the map to live-update, but with old data? So I'd be watching a track being constantly updated, but with locations that were logged some time ago?

Since this is likely quite easy to implement, I will consider it. But I must admit, it doesn't sound very useful to me.

Why not just publish your tracks a few days after you made them?

Best regards, Martijn.

tinuzz avatar Apr 07 '21 20:04 tinuzz

Yup that exactly what I’m thinking. Mostly for security so there’s no interaction but people don’t know where you are right now live. For example I am wanting to use it on my boat so people can follow my progress but they wouldn’t be able to track me down live if they wanted to. Gives me a few days security if that makes sense.

jdetmold avatar Apr 08 '21 02:04 jdetmold

I would like to second this feature. I am a leader at Scouting and we want to use it for a game, where other teams see your location, but with a delay. (So it is not too simple to catch you) I would like the delay to be minutes instead of days, so please make that configurable.

nickstolwijk avatar May 08 '23 14:05 nickstolwijk

Hi,

The [tsmap] shortcode already has a parameter called maxage, which can be used to limit the amount of historical data to be displayed on the map. For example, if you have a track that spans multiple days, but you specify maxage=1d on the shortcode, only the last 24 hours of the track would be displayed.

I propose to add a minage parameter, that works exactly the same, but for the other end of the track. So setting minage=1d would display the track, but ending at a location that was logged at least 24 hours ago. minage=5m would leave out the last 5 minutes.

Would that work?

Martijn.

tinuzz avatar May 08 '23 14:05 tinuzz

That would be great!

For people wondering about the game (in Dutch): http://handboek.pe1mew.nl/?Spelidee%C3%ABn:The_Outlaw_becomes_the_Hunted

nickstolwijk avatar May 08 '23 14:05 nickstolwijk

Hmmmm...

Looking at the code, it appears I incorrectly remembered how the maxage parameter works. It doesn't actually truncate the track when it is displayed, but instead, it just doesn't display the track (the whole track) if it hasn't been updated for the specified amount of time. If the track has been updated recently enough, it is displayed in full.

So the new parameter should work a little bit differently. Hence, I think using delay as the shortcode parameter, as proposed by @jdetmold, would make more sense.

tinuzz avatar May 08 '23 15:05 tinuzz

I had need for it tomorrow, so I have tried to add it myself. Looks like it is working! (Normally I don't do PHP but Java, but it looks like I could handle this. ;-) )

Don't hurry with releasing, I have installed my own version on my docker image of Wordpress.

nickstolwijk avatar May 16 '23 16:05 nickstolwijk

This is a great feature!! Thanks

p3ck avatar Jun 05 '23 21:06 p3ck