Change the image layout map dynamically

Hello there,

Today let’s talk about how to change the image layout map dynamically.

Let’s imagine that we need to use 2 maps, one for US and another one for CA and you have a country selector that when you change the element to US, you want to see US map and the same for CA.

To do that, you just have to:

  1. Create a new attribute and add an expression like this: ApplySimple(“case when #0 = ‘US’ then ‘VisFramework/map/us.html’ else ‘VisFramework/map/ca.html’ end”; country_name)

As you can see, we have this applysimple with a case to test when the country is US or CA, then we are adding the string and pointing where are the image maps in Microstrategy Web/Mobile.

Now you have to rename the attribute form to “SHAPEFILE”, like the image below:


2. Save your attribute. Open the document and add that attribute with your desired attribute, like this:


3. Configure it to use the Image Layout Widget:


Now, when you select US or CA in your selector, it will automatically change to the right map.

Hope it helps!

God bless you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.