if (layer != null && layer.FullExtent != null) { if ((layer.FullExtent.Width > 0.0) || (layer.FullExtent.Height > 0.0)) { this.maplegend.Map.ZoomTo(layer.FullExtent); } else { this.maplegend.Map.PanTo(layer.FullExtent.GetCenter()); } }
Hi,The Map control will re-project graphics layers and feature layers but for all other types of service layer the reprojection is handled on the server. The spatial reference of the service itself and the spatial reference of the full extent property remain unaffected and it is just the image rendered by the server which is re-projected. This means you will need to consider getting the envelope and using a LocalGeometryService or online GeometryServer to perform the reprojection before calling zoom to.CheersMike
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.