After creating a layout, using ElementFactory.Instance.CreateMapFrameElement(lyt, env, map) only displays the entire map view. However, I want to display the scale size that was last presented in the map. How can I achieve this?
To fix the scale of a map on a Layout u need to set a display constraint on the frame. See hereĀ https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Layouts#map-frame-display-constraints. Look at fixed scale and fixed center and scale.
Thank you, but in the end, I used SetCamera to achieve my goal. I appreciate your suggestion nonetheless. Here's the code snippet:
Camera camera = map_frame.Camera;camera.Scale = mapView.Camera.Scale;camera.X = mapView.Camera.X;camera.Y = mapView.Camera.Y;map_frame.SetCamera(camera);
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.