private void OnImageRequest(ImageRequestEventArgs args)
 {
     if (ImageRequest != null)
     {
         ImageRequest(this, args);
     }
 }
Example #2
0
 private void OnImageRequest(ImageRequestEventArgs args)
 {
     if (ImageRequest != null)
     {
         ImageRequest(this, args);
     }
 }
        /// <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;
        } 
Example #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);
        }