//

2793
13
Jump to solution
01-15-2020 10:37 AM
_____
by
New Member
 
0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

Are you referring to the defaultPopupTemplateEnabled property? If so, we should have this added for the MapImageLayer Sublayer at the next (4.15) release. If not, here is a simple example of setting popups on a Sublayer: https://codepen.io/noash/pen/VwYBobd 

View solution in original post

0 Kudos
13 Replies
Noah-Sager
Esri Regular Contributor

Are you referring to the defaultPopupTemplateEnabled property? If so, we should have this added for the MapImageLayer Sublayer at the next (4.15) release. If not, here is a simple example of setting popups on a Sublayer: https://codepen.io/noash/pen/VwYBobd 

0 Kudos
by Anonymous User
Not applicable

Hi Noah Sager‌ this is what I am looking to do too... Show all fields for popups for all visible layers in a map service.

So far examples and Documentation are hard-coding fields and schemas in to the sublayers array. Layers often to change schema. For me showing all fields and having data outweighs formatting the fields. (and which can be done from the GIS or SQL)

From what I understand Noah - should I just be able to take your example, add a MapImageLayer and then do view.popup.defaultPopupTemplateEnabled = true  ? 

It does not seem to work or turn on popups.  I do note that initially this did not support Map Image Layer in the API but as you noted, it should be built in now to the API? I tried with 4.16 and even 4.17 and it did not work. Thank you for any advice!  (for reference, it works fine for featureLayers; but I was hoping to use it on Map Image Layer).  I want it for Map Image Layer because I am hoping it will then turn popups on for any and all sublayers on the service. 

https://codepen.io/kevinsagis/pen/QWyRBEX 

If not, I suppose I would have to loop through and gather all the sublayers to an array from the allSublayers method? 

This was the goal here too I believe; for cross-reference 4.12 Popup changes: why? (and what now?..) 

I hope to enable all popups from a map image layer; or as another strategy, I could add all sublayers each as a featureLayer.  However I don't think I want to go that route; much easier if it would just show all fields for all visible sublayers of a mapImage service, as "{*}" worked back in the 3.x API.

0 Kudos
by Anonymous User
Not applicable

Greetings Noah Sager‌ I cleaned up the Pen https://codepen.io/kevinsagis/pen/QWyRBEX  to illustrate this.  The default Popup works for a single featureLayer sublayer. But it does not work for a mapImage layer.   Is this a bug or did it not get implemented yet in 4.15?  I even tried 4.17 API CDN still no dice. Thoughts? Thank you for guidance and advice.

Noah-Sager
Esri Regular Contributor

Hi Kevin MacLeod‌, my apologies. This did not get implemented in 4.15. We had installed a fix, which I verified was working, but there were other complications, so we had to roll it back (and I forgot to update this thread). We are still working on this, and hope to have it fixed for 4.17 in October.

by Anonymous User
Not applicable

Noah Sager‌ thank you kindly for the reply. I will be happy to give it a test then; or when it is in the Next 4.17 nightly. 

This is one of three components I'm looking for, to restore popups to their glory in 3.x  ...   1. Moving popups (mostly implemented https://codepen.io/kevinsagis/full/bGpdQQq ) 2. Popups that show all fields for all visible layers   3. List of fields to exclude will be excluded, based on matching field name of field and slicing out of array of fields to discard.

Great Dev Summit video on TypeScript.  I am watching.. as you say it's an adjustment.. I can see the long-term benefit though of fixing problems in TypeScript from type-safe checking vs tracking down problems at runtime in the browser.  https://codepen.io/kevinsagis/full/bGpdQQq

_____
by
New Member

//

0 Kudos
Noah-Sager
Esri Regular Contributor

Hi Ian, thanks for checking-in. This is still a work in progress. We'll update this thread once we have an update to share.

0 Kudos
KristianTuusjärvi
New Contributor II

Should the view.popup.defaultPopupTemplateEnabled = true; be working now? On 4.22? I'm using MapImageLayer and it seems that it doesn't enable default templates for all sublayers.

0 Kudos
LukeCalladine
New Contributor III

@Noah-Sager - Just to confirm, is this still a work in progress as of 4.23?

0 Kudos