• rsjennings84

    (@rsjennings84)


    I would like some help or see it as a FE in the future. I have been playing around with the latest version and I may be the only user that would want this, as I am using this plugin differently than what it was designed for. I understand this plugin was designed to show where you hiked or a path you took to get to a location and plot it on a map. I am using this as a GPS tracking for my storm chasing team. The FE would be to clear the markers off the map after the chaser stops broadcasting. So I could see the code being, “If marker last update time >15 min then remove marker”. This would not be a default setting but you would have to specify if you wanted this feature on or off by something in the shortcode like markertimeout=y.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author tinuzz

    (@tinuzz)

    I implemented this yesterday ?? It will be part of the next release.

    There is a shortcode attribute called ‘maxage’, it takes a time expression like ‘120s’, ’30m’, ‘2h’ or ‘3d’ and when it’s used, it keeps live tracks that haven’t been updated within that time from showing on the map.

    Will that work?

    Best regards,
    Martijn.

    Thread Starter rsjennings84

    (@rsjennings84)

    That will work, thanks again man for all your hard work. I have been doing some digging around and love your code. It is easy to follow and figure things out. The last thing I need to learn and figure out is the .on(‘click’) function. I have tried to manipulate what you have there for the infobar and make a popup instead when you click on the dots, just cant quite figure that out. Also I have been trying to work on adding a field in the your profile to add a youtube live link, so when you click on the users dot you would get a pop up which would give info such as name, title, and a live link where you can click on it and watch their youtube live feed. This may be useful for others as well with all the social media stuff going on, other users may want to share their hikes on a live stream. Just an idea and not sure how much it would take to implement, but Would be a great feature in the future.

    Thread Starter rsjennings84

    (@rsjennings84)

    That will work, thanks again man for all your hard work. I have been doing some digging around and love your code. It is easy to follow and figure things out. The last thing I need to learn and figure out is the .on(‘click’) function. I have tried to manipulate what you have there for the infobar and make a popup instead when you click on the dots, just cant quite figure that out. Also I have been trying to work on adding a field in the your profile to add a youtube live link, so when you click on the users dot you would get a pop up which would give info such as name, title, and a live link where you can click on it and watch their youtube live feed. This may be useful for others as well with all the social media stuff going on, other users may want to share their hikes on a live stream. Just an idea and not sure how much it would take to implement, but Would be a great feature in the future

    Thread Starter rsjennings84

    (@rsjennings84)

    That will work, thanks again for all your hard work. One other thing I need to work on is adding a couple of fields within the your profile menu and that would be one field for identifying the title of a user and the other would be the users youtube live link. I would then like to incorporate those fields for 1 filtering our which dots to see on a map, and 2 displaying a pop up on the map when you click on a dot. The pop up would contain the users name, title, and a link to their yourtube live. I have tried to modify the on(“click”) that you have utilized for the infobar, but cant get it to work. I think this feature would not only be useful for our application but others applications as well as a lot of people like to share these kinds of things today, like when they go on hikes or maybe if they are on a drive and show video from their drive. Just a thought for later releases.

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    Just a quick answer to let you know I read and appreciate your messages. I agree that some popup functionality would make a useful addition, but I’m not sure yet how to implement that. The beauty of WordPress and its plugin architecture is in the use of hooks and filters. If a plugin calls hooks at the right time, you can alter their behaviour from another plugin, and that is likely what you need. For example, the Youtube link field is not something I would implement inside Trackserver, but in a seperate plugin. If you need extra filters on which tracks are shown on the map, I could add a filter just after my own queries, so another plugin can modify the list before it is sent to the client. The possibilities are endless.

    With the JavaScript, I don’t have time to dive into it right now, but it shouldn’t be hard. The on(‘click’) on the end marker is already there, so you can just add functionality to it. See https://leafletjs.com/reference.html#popup on how to create popups on the map. Trackserver.js already has a few of those I believe.

    Good luck,
    Martijn.

    • This reply was modified 8 years ago by tinuzz.
    Thread Starter rsjennings84

    (@rsjennings84)

    Sorry for the multiple posts, they were not showing when I posted.

    So I have decided to use the existing info bar to display the content, as it is already there and just have to add my added variables.

    To answer the adding of a YouTube field I need this to be on a user level and stored as a variable on the user level. Then in the infobar it will link to their YouTube live stream by click on Watch Live.

    Thread Starter rsjennings84

    (@rsjennings84)

    Ok forgive me, I have been going at this in a fashion that I wasnt looking at all the details. I have found a place where I can set a user based variable and it is stored in the DB. I am going to use the website field that is under the users profile for wordpress. I dont know why I didnt think of that before, but I can have them put their youtube link in there.

    What I need help with next is where to put it in the trackserver.php file and lastly where the onclick command is for clicking on the end markers. I have noticed that if you click on them when live is not on, it still centers on the marker, and when live is on and infobar=t the infobar comes up and centers when you click on the marker. So I would like it to still center.

    Would this code be where I need to add the user_url data?

    if ( $row['user_id'] ) {
    					$metadata['userid'] = $row['user_id'];
    					$metadata['userlogin'] = $this -> get_user_id( (int) $row['user_id'], 'user_login' );
    					$metadata['displayname'] = $this -> get_user_id( (int) $row['user_id'], 'display_name' );
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Remove Marker After Certain Amount of Time’ is closed to new replies.