Skip to main content
removed duplicate phrase
Source Link
nmtoken
  • 13.6k
  • 5
  • 38
  • 89
    var featureLayer = new FeatureLayer({
      url: "https://services.arcgis.com/8MqUfIH3ilrffIf0/arcgis/rest/services/aneityum_SPEED_example_30May2017_geo/FeatureServer",
      outFields: ["*"],
      popupTemplate: {
        title: "{ipa}",
        content: "<p><b>Definition:</b> {gloss}</p>" + "<p>Definition provided by: {authority}</p>",
        type: "media",
        mediaInfos: [{
          title: "test",
          //caption: "DEF: {gloss}\n Definition provided by: {authority}",
          type: "image",
          value: {
            sourceUrl: "{image_link}"
            //linkUrl: "{image_link}"
          }
        }]
      }
    });

I'm trying to put images into my popup (using ArcGIS Javascript API), the links to which are included within the included within the GeoJSON file in the map server. However, the media feature does not seem to be working––the "test" title is not even showing up. Any ideas as to why?

    var featureLayer = new FeatureLayer({
      url: "https://services.arcgis.com/8MqUfIH3ilrffIf0/arcgis/rest/services/aneityum_SPEED_example_30May2017_geo/FeatureServer",
      outFields: ["*"],
      popupTemplate: {
        title: "{ipa}",
        content: "<p><b>Definition:</b> {gloss}</p>" + "<p>Definition provided by: {authority}</p>",
        type: "media",
        mediaInfos: [{
          title: "test",
          //caption: "DEF: {gloss}\n Definition provided by: {authority}",
          type: "image",
          value: {
            sourceUrl: "{image_link}"
            //linkUrl: "{image_link}"
          }
        }]
      }
    });

I'm trying to put images into my popup (using ArcGIS Javascript API), the links to which are included within the included within the GeoJSON file in the map server. However, the media feature does not seem to be working––the "test" title is not even showing up. Any ideas as to why?

var featureLayer = new FeatureLayer({
      url: "https://services.arcgis.com/8MqUfIH3ilrffIf0/arcgis/rest/services/aneityum_SPEED_example_30May2017_geo/FeatureServer",
      outFields: ["*"],
      popupTemplate: {
        title: "{ipa}",
        content: "<p><b>Definition:</b> {gloss}</p>" + "<p>Definition provided by: {authority}</p>",
        type: "media",
        mediaInfos: [{
          title: "test",
          //caption: "DEF: {gloss}\n Definition provided by: {authority}",
          type: "image",
          value: {
            sourceUrl: "{image_link}"
            //linkUrl: "{image_link}"
          }
        }]
      }
    });

I'm trying to put images into my popup (using ArcGIS Javascript API), the links to which are included within the GeoJSON file in the map server. However, the media feature does not seem to be working––the "test" title is not even showing up. Any ideas as to why?

edited tags; edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Trouble displaying Displaying media (JPG) in Popup for Feature Layer?

added 11 characters in body; edited tags
Source Link
    var featureLayer = new FeatureLayer({
      url: "https://services.arcgis.com/8MqUfIH3ilrffIf0/arcgis/rest/services/aneityum_SPEED_example_30May2017_geo/FeatureServer",
      outFields: ["*"],
      popupTemplate: {
        title: "{ipa}",
        content: [{
          type: "text",
          text: "<p><b>Definition:</b> {gloss}</p>" + "<p>Definition provided by: {authority}</p>",
        }, { type: "media",
        mediaInfos: [{
          title: "test",
          //caption: "DEF: {gloss}\n Definition provided by: {authority}",
          type: "image",
          value: {
            sourceUrl: "{image_link}"
            //linkUrl: "{image_link}"
          }
        }]
      }]
      }
    });

I'm trying to put images into my popup (using ArcGIS Javascript API), the links to which are included within the included within the GeoJSON file in the map server. However, the media feature does not seem to be working––the "test" title is not even showing up. Any ideas as to why?

    var featureLayer = new FeatureLayer({
      url: "https://services.arcgis.com/8MqUfIH3ilrffIf0/arcgis/rest/services/aneityum_SPEED_example_30May2017_geo/FeatureServer",
      outFields: ["*"],
      popupTemplate: {
        title: "{ipa}",
        content: [{
          type: "text",
          text: "<p><b>Definition:</b> {gloss}</p>" + "<p>Definition provided by: {authority}</p>"
        }, { type: "media",
        mediaInfos: [{
          title: "test",
          type: "image",
          value: {
            sourceUrl: "{image_link}"
            linkUrl: "{image_link}"
          }
        }]
      }]
      }
    });

I'm trying to put images into my popup (using ArcGIS Javascript API), the links to which are included within the included within the GeoJSON file in the map server. However, the media feature does not seem to be working––the "test" title is not even showing up. Any ideas as to why?

    var featureLayer = new FeatureLayer({
      url: "https://services.arcgis.com/8MqUfIH3ilrffIf0/arcgis/rest/services/aneityum_SPEED_example_30May2017_geo/FeatureServer",
      outFields: ["*"],
      popupTemplate: {
        title: "{ipa}",
        content: "<p><b>Definition:</b> {gloss}</p>" + "<p>Definition provided by: {authority}</p>",
        type: "media",
        mediaInfos: [{
          title: "test",
          //caption: "DEF: {gloss}\n Definition provided by: {authority}",
          type: "image",
          value: {
            sourceUrl: "{image_link}"
            //linkUrl: "{image_link}"
          }
        }]
      }
    });

I'm trying to put images into my popup (using ArcGIS Javascript API), the links to which are included within the included within the GeoJSON file in the map server. However, the media feature does not seem to be working––the "test" title is not even showing up. Any ideas as to why?

Source Link
Loading