Customize Overview map

1948
1
Jump to solution
04-20-2016 05:24 AM
TimWitt2
MVP Alum

Hey everybody,

is there a way to customize how far in or out the overview map is zoomed? I noticed that when I first add the overview map it zooms in or out, depending on how I zoom in and out in the main map.

My goal is to always show a full country in the overview map.

Thanks,

Tim

0 Kudos
1 Solution

Accepted Solutions
TimWitt2
MVP Alum

After some digging in the code I found a solution for my case. I figured I post here what I did to achieve what I needed.

This will only work if each of your main section maps are zoomed in on your map exactly the same. You need to host your story map on your own server.

1. Go to the app folder of your story map and open viewer-min.js with your favorite text editor ( I use Notepad++)

2. Open Find and search for color:"transparent"

3. After this property insert the following expandFactor: 5 (The following is the explanation what the number will do: The ratio between the size of the overview map and the extent rectangle displayed on the overview map. The default value is 2, meaning the overview map will be at least twice the size of the extent rectangle.)

5. See my screenshot to make sure what your code should look like.

4.  Now open your story map and check if the overview map fits your needs. If it doesn't, use a different expandFactor.

I hope this helps!

Tim

View solution in original post

1 Reply
TimWitt2
MVP Alum

After some digging in the code I found a solution for my case. I figured I post here what I did to achieve what I needed.

This will only work if each of your main section maps are zoomed in on your map exactly the same. You need to host your story map on your own server.

1. Go to the app folder of your story map and open viewer-min.js with your favorite text editor ( I use Notepad++)

2. Open Find and search for color:"transparent"

3. After this property insert the following expandFactor: 5 (The following is the explanation what the number will do: The ratio between the size of the overview map and the extent rectangle displayed on the overview map. The default value is 2, meaning the overview map will be at least twice the size of the extent rectangle.)

5. See my screenshot to make sure what your code should look like.

4.  Now open your story map and check if the overview map fits your needs. If it doesn't, use a different expandFactor.

I hope this helps!

Tim