Example #1
0
        private async void OnImageIdChanged(object sender, TextChangedEventArgs e)
        {
            TextBox           textBox           = sender as TextBox;
            string            imageId           = textBox?.Text ?? string.Empty;
            PaneImageIdSearch paneImageIdSearch = ((dynamic)DataContext);

            paneImageIdSearch.ImageInfo.Clear();

            if (imageId.Length == 8)
            {
                ModulestreetSmart    streetSmart = ModulestreetSmart.Current;
                CycloMediaGroupLayer groupLayer  = streetSmart.CycloMediaGroupLayer;

                foreach (var layer in groupLayer)
                {
                    SpatialReference spatialReference = await layer.GetSpatialReferenceAsync();

                    string            epsgCode          = $"EPSG:{spatialReference.Wkid}";
                    FeatureCollection featureCollection = FeatureCollection.Load(imageId, epsgCode);

                    if (featureCollection.NumberOfFeatures >= 1)
                    {
                        foreach (Recording recording in featureCollection.FeatureMembers.Recordings)
                        {
                            paneImageIdSearch.ImageInfo.Add(recording);
                        }
                    }
                }
            }
        }