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