Grey Out Map Features Instead of Removing Them

415
0
09-23-2024 07:37 AM
JeffreyThompson2
MVP Frequent Contributor
3 0 415

I'm making an application where users can filter UFO sightings to find the encounters most similar to their own. I don't like hiding THE TRUTH from my users and I want everyone who comes to my site to know WE ARE NOT ALONE in seeing UFOs, so I don't want the filtered out items to be removed from the map. The UFOs being filtered out should engage their cloaking device so they are harder to detect visually and their crafts must be unidentifiable to mouse clicks. Surely, this is all beyond the means of modern technology? I WANT TO BELIEVE this is possible in Experience Builder. THE TRUTH IS OUT THERE. Let's find out.

In the Online MapViewer, I have built a map that's looking how I want it when no filters are selected with the UFO sightings in bright glowing green orbs.

JeffreyThompson2_0-1727096711911.png

To pull off this feat that defies all know laws of physics, I will click the three dot menu next to the UFO Sightings layer are hit Duplicate. This cloning experiment will create a second copy of the UFO Sightings layer and I'll drag it down in my layer order under the original. I'll Rename the copied layer with the classified code name of Other UFO Sightings. I'll turn off the visibility on the original UFO Sightings layer for now.

JeffreyThompson2_1-1727097378031.png

Now, I will alter the appearance of the Other UFO Sightings layer. In the Properties Panel, I will turn off Show In Map Legend and crank up the Transparency to 75%. And I'll Edit Layer Style, changing the dots from a glowing green to a Roswell Grey. Then, I'll go to the Popup Settings and turn them off for this layer.

JeffreyThompson2_2-1727098011534.png

JeffreyThompson2_3-1727098043305.png

I turned my UFO Sightings layer back on, so now we have many UFO sightings we know about and many more we don't. If you're not paying attention, this map doesn't look any different than it did before, but there is so much more that is being hidden from the public. I will save my map and continue in Experience Builder.

JeffreyThompson2_4-1727099499294.png

In my Experience Builder project, I have my map in a Map Widget, a Map Layers Widget and a Legend Widget. The Legend Widget is unable to detect the Other UFO Sightings layer due to the advanced technology of the Online MapViewer, but the Other UFO Sightings layer is still visible in the Map Layers Widget. How do we classify it?

JeffreyThompson2_5-1727100222233.png

In the Map Layers Widget Settings Panel, click the UFO Map under Customize Layers. Then Enable Customize Layers and uncheck Other UFO Sightings. Now, the true number of UFO Sightings is being hidden from us.

JeffreyThompson2_6-1727100460989.png

Finally, I add a Filter Widget and make a filter for the UFO Sightings layer.

JeffreyThompson2_0-1727101149269.png

Users of the site can filter the UFO Sightings layer and see the number of green orbs go down, revealing the hidden, grey Other UFO Sightings layer. Popups will be able to explain the green orbs, but the grey circles will be shrouded in mystery.

JeffreyThompson2_1-1727102121003.png

For a little mood music, here's the X-Files Theme Song.

About the Author
A frequently confused rock-hound that writes ugly, but usually functional code.