Map with Layers Help
Oct 05, 2012
Hi everyone...I need your ideas on two issues please.
Issue #1:
I have attached my story file so you can take a look and give me your thoughts. I have created a map of the US with a variety of groups of markers. These groups of markers are of various colors and represent different groups. What I want to be able to do is to click on the markers in the legend in the lower left hand corner and have that group of markers appear. You can try it out...it works fine. I would then like to click on the marker and have that group of markers disappear...I have tried various ways and cant figure out an easy way to make it work...so I just added another trigger on another object that hides the layer...you can see that object just to the right of the marker. So click on the marker and all the other markers appear...click on the marker name and the group disappears...Not the most elegant of solutions but it works. How can I improve so you basically click on the marker once to turn the markers on, then click again to turn them off.
Issue #2:
If you show all the markers on the map and then click on the actual markers within the map you will notice that when the marker expands depending on which layer it is on it will appear behind markers that are in front of it. Play with the markers in Florida to see my issue....Any ideas for solutions. I would think the markers would all have to be on the same layer but then I don't know how to hide or disply them.
Thanks for your help!
Bret
6 Replies
You could duplicate the markers on the other layers, or set a trigger to close the layers
Hey Bret,
I just tried this for the Group 1 Marker and 2 Markes and it worked, but with a caveat. First, what I did
1. Add a visited state for rectangles 1 and 2
2. For rectangle 1, added a trigger that hides Group 1 when the user clicks it IF Rectangle 1's state is equal to visited
3. Did same for rectangle 2
Caveat: for some reason, the first time I click on these rectangles, nothing happens. After that, they work as anticipated. That is, clicking once shows the layer, clicking again hides it. And it works repeatedly.
I tried switching the order of the trigger, that is having the hide trigger first. When I do that clicking once on the rectangle DOES display Group 1 immediately, but clicking again doesn't hide it.
So, I'd be interested to know what I'm doing wrong here.
It won't hide if the trigger is before a show trigger, this is because they fire in order. As show is the last trigger the Ayer can never be hiddenhidden
Phil, so I understand why show needs to be first. What I don't understand is why, after I add the hide trigger (and I have it under show in the Triggers pane), it needs to be clicked 2 times before it begins to work. Then it works as expected: on/off, on/off....
Hat is because your condition of visited is not true until the second press
Wait. I'm confused So the sequence is this
1. Show layer Group X when the user clicks Rectangle x
2. Hide layer Group 2 when the user clicks Rectangle x if the rectangle's state is equal to visited (which it is after step 1)
So my thinking is the first time the user clicks rectangle X, Group X will show. But it doesn't show until a 2nd click.
The trigger doesn't say Show Layer Group X when the user clicks Rectangle X if Rectangle X is visited
???
This discussion is closed. You can start a new discussion or contact Articulate Support.