예제 #1
0
        internal async void CreateMarker(ViewMapTrip mapPage, MapUIElementCollection _element)
        {
            if (MarkerAlbum != null)
            {
                MarkerAlbum.Delete();
            }

            StorageFile _file;

            try
            {
                if (Summary.Sample)
                {
                    _file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///appdata/" + Summary.PathThumb + "/" + Summary.PicturesThumb[0]));
                }
                else
                {
                    StorageFolder folder = await ApplicationData.Current.LocalFolder.GetFolderAsync(Summary.PathThumb);

                    _file = await folder.GetFileAsync("Small_" + Summary.PicturesThumb[0]);
                }

                Uri         uri = new Uri(_file.Path, UriKind.RelativeOrAbsolute);
                BitmapImage bm  = new BitmapImage()
                {
                    UriSource = uri
                };
                MarkerAlbum = new MarkerPosition(mapPage, _element, Id, bm, Position, true, 20);
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
                return;
            }
        }
예제 #2
0
        internal void CreateMarker(ViewMapTrip mapPage, MapUIElementCollection _element, int _count)
        {
            if (MarkerPicture != null)
            {
                MarkerPicture.Delete();
            }

            MarkerPicture = new MarkerPosition(mapPage, _element, _count, EIcon.IconFlag, Position, true, 20);
        }