Get information from AGOL new Webmapviewer

217
0
03-08-2022 07:34 AM
PHerk
by
New Contributor II

Working with the old Webmapviewer in AGOL, I was able to create a popupTemplate. I used the information from this popupTemplate to draw the content of my custom fields based on the visibility flag, using the Javascript API.

for (var i = 0; i < featurelayer.popupTemplate.fieldInfos.length; i++) {
   if (featurelayer.popupTemplate.fieldInfos[i].visible)) {
      "draw field "
   }
}
 
The new Webmapviewer provides a way to define a form, with extra options like 'allow edit' and the sort order of the fields. Can I request this information in the Javascript API and how should this be done?
 
0 Kudos
0 Replies