ArcGIS Javascript API v4.10 - Use relationships in popuptemplate with MapImageLayer

337
0
02-26-2019 10:49 AM
MaximeDemers
Occasional Contributor III

Hi,

Is it possible to use relationships in popupTemplate with sublayers in MapImageLayer? I am doing the following but the related fields are not displayed.

            var layer = new MapImageLayer({
                "url": "https://infogeo.education.gouv.qc.ca/arcgis/rest/services/SandBox_Maxime/TEST_LOISIRS/MapServer",
                "imageFormat": "png",
                "title": "Test loisirs",
                "sublayers": [
                    {
                        id: 0,
                        popupTemplate: {
                            title: "Sites",
                            outFields: ["*"],
                            content: [
                                {
                                    type: "fields",
                                    fieldInfos: [
                                        {
                                            fieldName: "id",
                                            visible: true,
                                            label: "Id"
                                        },
                                        {
                                            fieldName: "relationships/0/trajet",
                                            visible: true,
                                            label: "Trajet"
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                ]
            });

Does the relationships in popupTemplate only works with FeatureLayer?

0 Kudos
0 Replies