Hi @Bill Chappell and users,

I would like to add add a thumbnail related to each feature on a mapView on click or click on next feature this latter due to features overlapping.

My GeoJSON has an attribute thumbnails which has the path for the thumbnails "./images/thumbs.svg"

I have a div id="quickLook" created to display the thumbnails.

Following the information in here and discussed in here, in order to add the feature thumbnail to the Div element , I did the following.

function createForestLayer(graphics) {
        if (graphics) {
          wgs84Graphics = graphics;
        } else {
          graphics = wgs84Graphics;
        // display projected graphics as a FeatureLayer
        countriesLayer = new FeatureLayer({
          title: "Cosmo Skymed Images",
          source: graphics,
          objectIdField: "OBJECTID",
          fields: myFields,

          renderer: myRenderer,

          popupTemplate: myPopup,

          template: {
                           name: "{tp_produto}",
                           thumbnail: '<img src=${thumbnail} alt="View" style="width:304px;height:228px;">'




{thumbnail} attribute contains the path for the feature thumbnail.

Could someone tell me if I am on the right track and if the template settings are correct?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.