Search code examples
javascriptdojoarcgisesriarcgis-js-api

How to display attached image on map click in ArcGis JavaScript API?


I am new to ArcGis JavaScript API. I want to display attached image on map click. Images are in blob format. How to display images in popup template?


Solution

  • If I understand what you mean correctly, the things that you are probably looking for are custom InfoWindow and InfoTemplate classes. An InfoWindow is just and HTML popup that can be customized through the API. An InfoTemplate is an abstraction attached to the InfoWindow that can be used to transform the features attributes into HTML.

    The following link may help you:

    https://developers.arcgis.com/javascript/3/jssamples/widget_extendInfowindow.html

    Don't forget to also look into InfoWindow and InfoTemplate documentation at the same site from the previous link.

    Let me know if this give you some directions on how to solve your problem.

    Note: Maybe this question would get faster answers at http://gis.stackexchange.com