Select to view content in your preferred language

Zoom to Selected Feature within Layout Guides

5452
16
Jump to solution
02-10-2021 11:42 AM
KieranClark
Regular Contributor

I currently have a feature layer with 400+ items (lines drawn on a world map representing submarine telecommunications cables around the world) and I need to spit out a map for each individual line on an 8.5" x 11" page. The selected cable line itself and all the respective labeling also need to fit within specific margins on the page to account for things like title and status bars.

My current layout looks like this:

MapLayout.png

 

I need the selected element to be framed within the guide lines, but the map frame needs to take up the currently indicated space. The final map output (with the information added for the publication) looks like this:

AJCOutput.png

 

Eventually I would like to automate this entire process but for now I would like to speed up the map portion by setting a "Zoom to Selected" constraint within the layout guides. Is this possible?

0 Kudos
1 Solution

Accepted Solutions
JustinJohnston
Frequent Contributor

Update: You actually might just try "Best Fit Extent" when making your map series.  Create a spatial map series—ArcGIS Pro | Documentation

If it were me, I would try adding a calculated field called "Zoom" or "Scale Field" for the items/lines and I would do a calculation based on the length of the line, the size of the map frame, and roundup to nearest 1000 or something to make it a round number.  Then I would just use Map Series for the layout that is based on the lines, and for Map Extent, I would "Use Scale from Field" and point to your calculated field.  It might get a little funky if lines are on angles rather than north south since the zoom is based on length alone, but might get you close.  Once you have it, you can scan through the map series and manually edit the attribute table to change Zoom or Scale Field to what you think looks good and rerun the map series on the updated field.  

Cheers,

Justin

View solution in original post

16 Replies
JustinJohnston
Frequent Contributor

Update: You actually might just try "Best Fit Extent" when making your map series.  Create a spatial map series—ArcGIS Pro | Documentation

If it were me, I would try adding a calculated field called "Zoom" or "Scale Field" for the items/lines and I would do a calculation based on the length of the line, the size of the map frame, and roundup to nearest 1000 or something to make it a round number.  Then I would just use Map Series for the layout that is based on the lines, and for Map Extent, I would "Use Scale from Field" and point to your calculated field.  It might get a little funky if lines are on angles rather than north south since the zoom is based on length alone, but might get you close.  Once you have it, you can scan through the map series and manually edit the attribute table to change Zoom or Scale Field to what you think looks good and rerun the map series on the updated field.  

Cheers,

Justin

KieranClark
Regular Contributor

Hi Justin,

Thank you for the detailed reply - however I think you might need to break it down a bit further for me. I'm not a true GIS professional so I'm not sure how to do some of the things you mentioned.

I can add fields and set up calculated fields, though I'm not sure what the expression would be to do what you suggest.

JustinJohnston
Frequent Contributor

You start by making a layout.  Add a map frame to the layout that points to the map that has all of your "items".  I expect those items are a single feature class with lots of independent line records.  Before making a calculate field, I would try the "Best Fit Extent" option when making a map series.  That goes something like this.

1. Open the layout with the map frame pointing to the map that has your items

2. In the Layout ribbon, Page Setup Group, there is something called "Map Series", click that to open the Map Series wizard

3. For the Index Layer, point it to your feature class that has your items/lines

4. I assume each of your lines has its own name, so point to that for the Name Field and Sort Field.  If you don't have names for your lines, then just point to the ID for the records.

5. Then scroll down a bit and click "Map Extent"

6. Select the radio button for "Best Fit Extent".  I suspect the default settings might work for you. so after that

7. Click OK

8. Observe magic happening as 400+ map pages are created.

Cheers,

Justin

 

KieranClark
Regular Contributor

Oh wow, the Best Fit Extent gets me about 90% of the way there. As of right now, I can either have ALL the lines showing up or manually have to go through each map in the series and enable the display filter to show the single element that I need. Is there a way to automate this as well?

Additionally, I'd like to have another layer present in the map filtered through an expression for each map in the series. We have 800+ landings (cities, basically) marked for all the cable systems but each individual map should only show that single cable system's landings. I have set up filter expressions for all the systems so all I have to do is load the filter, apply it then have all my landings present.

JustinJohnston
Frequent Contributor

Hi Kieran,

Update:  Maybe you can find your answer here: Page queries in a spatial map series—ArcGIS Pro | Documentation

I haven't done it myself, so you will be learning on your own with this.  Let me know if you get it to work!

Cheers,

Justin

KieranClark
Regular Contributor

Justin, thanks so much - this looks like it will get me on the right track! 

KieranClark
Regular Contributor

Justin - this was absolutely the right answer! I just had to add a join to my cable landings table that associates landings with their cable systems (which was in a table I created already for other purposes) and using the Page Queries everything is filtering and displaying properly.

The final hurdle I have to overcome is that a handful of cable systems that cross the Pacific are unfortunately not framed properly. See below:

AAGOutput.png

 

Obviously, I would prefer the map series to frame it so that the cable isn't split like this. If there is not an easy way to do that, it's not really a big deal as I would have still cut down my manual workload by....about 90%.

TomBole
Esri Regular Contributor

Hi Kieran, 

You can do this if your map's coordinate system is in either a geographic coordinate systems and cylindrical projected coordinate systems.  For more information on this see the section Allow panning across the international date line in maps in the help topic Specify a coordinate system.

Here is where you'll find the checkbox under the Coordinate Systems tab of Map Properties.

Screenshot 2020-11-19 053457.png

Hope this helps, 

Tom

KieranClark
Regular Contributor

Hm, unfortunately I had this checked already. I wonder if it's because all the Transpacific lines have a break in the middle at the date line. I had to draw them this way initially because every time I tried to draw lines that crossed the date line there was an issue where the line would wrap all the way around the world instead of just crossing the line.

I will probably have to redraw some of these lines if I can avoid that wrap-around behavior but for now I can just output those handful of Transpacific maps manually.

0 Kudos