Esempio n. 1
0
        public static GeometryServiceOperationHelper GetProjectionHelper(EventHandler <ProjectGraphicsCompletedEventArgs> projectGraphicsCompleted, EventHandler <ProjectPointsCompletedEventArgs> projectPointsCompleted = null)
        {
            string geometryServiceUrl = new ConfigurationStoreHelper().GetGeometryServiceUrl(ConfigurationStoreProvider.DefaultConfigurationStore);

            if (string.IsNullOrEmpty(geometryServiceUrl))
            {
                System.Diagnostics.Debug.WriteLine("Must specify GeometryServiceUrl if spatial reference of the Map and the layer do not match");
                return(null);
            }
            GeometryServiceOperationHelper helper = new GeometryServiceOperationHelper(geometryServiceUrl);

            helper.ProjectGraphicsCompleted += projectGraphicsCompleted;
            helper.ProjectPointsCompleted   += projectPointsCompleted;

            return(helper);
        }
        public static GeometryServiceOperationHelper GetProjectionHelper(EventHandler<ProjectGraphicsCompletedEventArgs> projectGraphicsCompleted, EventHandler<ProjectPointsCompletedEventArgs> projectPointsCompleted = null)
        {
            string geometryServiceUrl = new ConfigurationStoreHelper().GetGeometryServiceUrl(ConfigurationStoreProvider.DefaultConfigurationStore);
            if (string.IsNullOrEmpty(geometryServiceUrl))
            {
                System.Diagnostics.Debug.WriteLine("Must specify GeometryServiceUrl if spatial reference of the Map and the layer do not match");
                return null;
            }
            GeometryServiceOperationHelper helper = new GeometryServiceOperationHelper(geometryServiceUrl);
            helper.ProjectGraphicsCompleted += projectGraphicsCompleted;
            helper.ProjectPointsCompleted += projectPointsCompleted;

            return helper;
        }