Dynamically change map styling

This was prompted by discussion here. The file here builds on the version shown at the meet-up earlier today

I only idea being tested here is a way to make the same map look different by swapping different attributes for visual elements (shape, colour etc.)

Read Me for the demo:

Switch to Map tab “Dynamic Map”

Select any note (rest are auto-detected) and use either stamp “Change Map to version A” or “Change Map to version B”.

Note the look & feel of the map changes and the Display Expression of the map changes to reflect map style A or B

If you change any note, update the settings by selecting any note (rest are auto-detected), and chose either stamp “Update Map A values” or “Update Map B values”

Only the following Attributes handled by this method: Color;AccentColor;Shape;Pattern;Shadow;ShadowColor;Xpos;Ypos;Width;Height

Note: this is not trying to address the ‘drawing’ view idea also being discussed.

This is very experimental - it is an experiment and not a copy/paste/use example. The answer to any “Can I…?” is likely Yes/probably. Go experiment.

Here is the TBX. map-switch-v1.tbx (197.0 KB)

1 Like

Something I’ve not yet had enough spare time to do is to do the logical extension of moving each in-scope attribute’s variants into a per-attribute dictionary. so rather than storing:

$MyBooleanA = true;
$MyBooleanB = false;

Use:

MyBooleanDict = dict("A:true;B;false");

But I also sense imagination can run ahead of sense here. How many alternates do we really need? Also, whilst the stamps use work on all notes on the map, there is no way to run a stamp with nothing selected, e.g. on a map view with nothing selected, which might be the condition on first opening the map.

Another factor action code can’t address is link position. I think a map remembers the exit/entry side of a shape but I’m not 100% sure.