protected override async Task <ImageSource> GetImageAsync()
        {
            var uri = GetImageUri();

            return(uri != null ? await ImageLoader.LoadImageAsync(uri) : null);
        }
示例#2
0
        /// <summary>
        /// Loads a tile ImageSource asynchronously from GetUri(x, y, zoomLevel).
        /// </summary>
        public virtual Task <ImageSource> LoadImageAsync(int x, int y, int zoomLevel)
        {
            var uri = GetUri(x, y, zoomLevel);

            return(uri != null?ImageLoader.LoadImageAsync(uri) : Task.FromResult((ImageSource)null));
        }
 private void LoadTileImage(Tile tile, Stream stream)
 {
     SetTileImage(tile, ImageLoader.LoadImage(stream));
 }
示例#4
0
        /// <summary>
        /// Loads a tile ImageSource asynchronously from GetUri(x, y, zoomLevel).
        /// </summary>
        public virtual async Task <ImageSource> LoadImageAsync(int x, int y, int zoomLevel)
        {
            var uri = GetUri(x, y, zoomLevel);

            return(uri != null ? await ImageLoader.LoadImageAsync(uri) : null);
        }