Select to view content in your preferred language

New Map Viewer Set Default Extent

12770
15
Jump to solution
07-22-2021 08:28 AM
Labels (1)
GraceAnneIngham
Occasional Contributor

I set the extent of my map under my Map Settings, but cannot figure out how to get the extent that I created to be used as the default when the map is loaded (i.e. if you click the home icon). 

15 Replies
MKF62
by
Frequent Contributor

I understand you want to set the extent at a very specific set of coordinates so your solution to editing the JSON is the best at the moment, but for those who come across this thread that want a particular view, but maybe don't need anything precise (i.e. eyeballing is good enough), you can create a bookmark. Then you can click the bookmark before you save to ensure the map saves at the appropriate extent (essentially it becomes your new home button).

Sleigh86
New Contributor

This is very helpful! Thank you!

0 Kudos
AndyKubrin
Emerging Contributor

I'm also interested in setting the default extent of a map for viewing, not for searching. But I can't follow @wayfaringrob's steps. When I copy the JSON into a code editor, I can't find `initialState` or `viewpoint`. 

What gives? Can anyone help me understand what's going on?

0 Kudos
wayfaringrob
Honored Contributor

1. No need to copy it out.

2. Are you copying the right code block? There are two, if I recall correctly. One for data and one for metadata (?)

0 Kudos
AndyKubrin
Emerging Contributor

Yes, there are two—data and metadata, as you said.

I copied the data block and looked in it, but I didn’t find viewpoint or
0 Kudos
wayfaringrob
Honored Contributor

Interesting. I'm seeing why you have to copy it out now, because Ctrl+F doesn't scroll to the result. But at any rate, I just checked a map of mine and it's still there, one of the very last lines of code.

0 Kudos