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);
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.