-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple tracks: Hide/show individually #66
Comments
Hi... I've the same question... Thank's.. |
I did find a solution which was to hid all the tracks and then, on a
track-by-track basis, replicate them as individual polylines.
I believe this is the code that does it. Elsewhere, I had set the native
track color to 0 to make it invisible.
teams[ix] = {};
teams[ix].marker = marker;
teams[ix].title = marker.options.title;
teams[ix].ix = ix;
teams[ix].color = marker.options.icon.options.fillColor;
var mytrack = L.geoJSON(playback._trackController._tracks[i]._geoJSON, {
style:{
color:teams[ix].color,
dashArray:dashPatterns[ix%5],
weight:2,
}
}).addTo(map);
teams[ix].track = mytrack;
…On Thu, Aug 30, 2018 at 8:41 AM, britoyenci ***@***.***> wrote:
Hi...
I've the same question...
I need to show/hide tracks individually on the map, but I haven't found
the solution.
Did you find any solution?
If so, can you share it please?
Thank's..
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af9OqA4Ec6dZ1IMXH4tOFGGxqNf_hKMwks5uWAe0gaJpZM4VMD_j>
.
|
Ok... I'm going to try based on that ... Thank you... |
It works on mine. You need to work out a scheme for addressing the track
you want to show/hide. I maintain an array with an index....
…On Thu, Aug 30, 2018 at 11:33 AM, britoyenci ***@***.***> wrote:
Ok...
I'm going to try based on that ...
Thank you...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af9OqOaDyBegkZki6M2txMdTl5aVqhLfks5uWC_sgaJpZM4VMD_j>
.
|
I will need to dig up the code....
…On Fri, Dec 8, 2023 at 12:25 AM Aycaa ***@***.***> wrote:
Hello, I'm trying to do something similar to your example. However, I was
not successful. Can you share a similar example? Thanks in advance :)
—
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH7U5KALG2DRWAJ6VKQSSRDYILFHNAVCNFSM4FJQH7R2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBUGY3TKMZXGQYA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The plugin is working great, but I want to add the ability to show or hide markers and their tracks individually.
Marker part works easily: I put each member of playback._trackController._tracks into an indexed array, then I can manipulate the .marker property of that to add or remove.
How can I grab the track line also?
Thanks!
The text was updated successfully, but these errors were encountered: