public ArcGISPortalServiceSearchProvider()
 {
     Results = _results;
     PagedResults = new PagedCollectionView(Results) { PageSize = _pageSize, };
     PagedResults.PageChanging += PagedResults_PageChanging;
     ResultsView = new ServiceSearchResultsView();
     InputView = new SingleLineSearchInputView();
     Properties.SetDisplayName(this, this.GetDisplayNameFromAttribute());
 }
Exemplo n.º 2
0
 public GoogleServiceSearchProvider()
 {
     Results      = _results;
     PagedResults = new PagedCollectionView(Results)
     {
         PageSize = 12,
         Filter   = (o) => { return(((SearchResultViewModel)o).IsInitialized); }
     };
     Properties.SetDisplayName(this, this.GetDisplayNameFromAttribute());
     ResultsView = new ServiceSearchResultsView();
     InputView   = new SingleLineSearchInputView();
 }
Exemplo n.º 3
0
 public ArcGISPortalServiceSearchProvider()
 {
     Results      = _results;
     PagedResults = new PagedCollectionView(Results)
     {
         PageSize = _pageSize,
     };
     PagedResults.PageChanging += PagedResults_PageChanging;
     ResultsView = new ServiceSearchResultsView();
     InputView   = new SingleLineSearchInputView();
     Properties.SetDisplayName(this, this.GetDisplayNameFromAttribute());
 }
 public GoogleServiceSearchProvider()
 {
     Results = _results;
     PagedResults = new PagedCollectionView(Results)
     {
         PageSize = 12,
         Filter = (o) => { return ((SearchResultViewModel)o).IsInitialized; }
     };
     Properties.SetDisplayName(this, this.GetDisplayNameFromAttribute());
     ResultsView = new ServiceSearchResultsView();
     InputView = new SingleLineSearchInputView();
 }
        public ArcGISLocatorPlaceSearchProvider(Map map) : base()
        {
            if (map == null)
                throw new ArgumentException();

            _map = map;
            _spatialRefWKID = _map.SpatialReference.WKID;

            // Determine map units
            _map.GetMapUnitsAsync(OnGetMapUnitsCompleted, OnGetMapUnitsFailed);

            // Hook to property changed to detect a change in map units
            _map.PropertyChanged += Map_PropertyChanged;

            // Initialize commands
            updateLocatorInfo = new DelegateCommand(doUpdateLocatorInfo, canUpdateLocatorInfo);

            // Initialize views
            ResultsView = new ArcGISLocatorResultsView();
            InputView = new SingleLineSearchInputView();

            _widthUnits = Utils.GetEnumDescriptions<LengthUnits>();
            if (_widthUnits.ContainsKey(LengthUnits.UnitsDecimalDegrees))
                _widthUnits.Remove(LengthUnits.UnitsDecimalDegrees);

            Results = _results;
            PagedResults = new PagedCollectionView(Results) { PageSize = _pageSize };
            ExtentFields = new ExtentFields();

            // Initialize geometry service and proxy URL with values from application environment if available
            if (MapApplication.Current != null)
            {
                // Bind the geometry service's URL to the environment's by default
                Binding b = new Binding("GeometryServiceUrl") { Source = MapApplication.Current.Urls  };
                BindingOperations.SetBinding(this, GeometryServiceUrlProperty, b);
            }

            // Initialize display name
            Properties.SetDisplayName(this, this.GetDisplayNameFromAttribute());

            // Listen for changes to the proxy URL
            Properties.NotifyOnDependencyPropertyChanged("ProxyUrl", this, OnProxyUrlChanged);
        }