Select to view content in your preferred language

Display popup without adding feature layer to the map

700
2
Jump to solution
05-17-2023 01:44 PM
BhavinSanghani
Frequent Contributor

I am using MapImageLayer to load the map and I want to display the popup on click on the highlighted graphic symbol.

I see samples to display Popup in the documentation and I would like to show output as displayed in https://developers.arcgis.com/javascript/latest/sample-code/popup-custom-action/ sample. However, it adds feature layer to the map. 

The questions are:

1) Can I use Arcade expression without adding feature layer on the map?

2) Is there any better way than going through the for loop and specifying the content to the PopupTemplate? See my code to highlight the feature https://codepen.io/b2810s/pen/zYmmNgB .

3) How does the style and formatting is displayed in the given sample. Is it a default popup style when the feature layer is added to the map?

 

 

0 Kudos
1 Solution

Accepted Solutions
JamesIng
Frequent Contributor

This is related to your other question and solution - if you create a client side featureLayer you'll be able to query the layerview directly and avoid any looping to create graphics and get the info to populate the Popup.

James from www.landkind.com

View solution in original post

2 Replies
JamesIng
Frequent Contributor

This is related to your other question and solution - if you create a client side featureLayer you'll be able to query the layerview directly and avoid any looping to create graphics and get the info to populate the Popup.

James from www.landkind.com
BhavinSanghani
Frequent Contributor

Correct, it will work for me, thanks!

0 Kudos