Exemplo n.º 1
0
 private void OnImageRequest(ImageRequestEventArgs args)
 {
     if (ImageRequest != null)
     {
         ImageRequest(this, args);
     }
 }
Exemplo n.º 2
0
 private void OnImageRequest(ImageRequestEventArgs args)
 {
     if (ImageRequest != null)
     {
         ImageRequest(this, args);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Get a generated custom tile image stream for the given uri.
        /// </summary>
        /// <param name="parameter">The tile image request parameter.</param>
        /// <returns>A stream of the custom tile image generated.</returns>
        public Stream GetTileImage(string parameter)
        {
            if (ImageRequest != null)
            {
                var args = new ImageRequestEventArgs(parameter);
                ImageRequest(this, args);

                // Seek the stream back to the begining just in case.
                args.ImageStream.Seek(0, SeekOrigin.Begin);

                return args.ImageStream;
            }

            return Stream.Null;
        } 
Exemplo n.º 4
0
        /// <summary>
        /// Get a generated custom tile image stream for the given uri.
        /// </summary>
        /// <param name="parameter">The tile image request parameter.</param>
        /// <returns>A stream of the custom tile image generated.</returns>
        public Stream GetTileImage(string parameter)
        {
            if (ImageRequest != null)
            {
                var args = new ImageRequestEventArgs(parameter);
                ImageRequest(this, args);

                // Seek the stream back to the begining just in case.
                args.ImageStream.Seek(0, SeekOrigin.Begin);

                return(args.ImageStream);
            }

            return(Stream.Null);
        }