using System; using System.Collections.Generic; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; namespace Converters { public class UriConverter : IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string uri = value as string; if (uri != null) return "http://www.YourSite.com/Thumbnails/" + uri; else return null; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } #endregion } }
Dominique:
Does your response mean you would need to duplicate the data in an ESRI feature class where attachments are enabled?
If that is the case, that is not desirable as you could be duplicating a large amount of data that is already stored in a different robust RDBMS.
Hello,
I just had to tackle this same issue. This solution will work with the blobs in the attachments table that is created from ArcCatalog, Manage, Create Attachments. I noticed in ArcOnline when you hover over the Open Attachment button you can see the simple URL it is calling. it is the MapService original URL with {objectID}/attachment/{attachmentID} tacked on the end
In summary this code will QueryRelatedRecord when the mouse enters the Graphic, and builds a small Pictures class. It then populates the MapTip UI with a HyperlinkButton with the Content being an Image and the Image Source being the extended URL
I've also used similar code to work with the Identify tool and added an Attachments section.
Hope this helps someone out there...
Dave