Thursday, 22 January 2015

arcgis javascript api 4 - Displaying media (JPG) in Popup for Feature Layer?


var featureLayer = new FeatureLayer({
url: "https://services.arcgis.com/8MqUfIH3ilrffIf0/arcgis/rest/services/aneityum_SPEED_example_30May2017_geo/FeatureServer",
outFields: ["*"],
popupTemplate: {
title: "{ipa}",
content: "

Definition: {gloss}

" + "

Definition provided by: {authority}

",
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?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...