Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for FeatureLayers #8

Open
vincentmajatladi opened this issue Oct 13, 2017 · 0 comments
Open

Support for FeatureLayers #8

vincentmajatladi opened this issue Oct 13, 2017 · 0 comments

Comments

@vincentmajatladi
Copy link

vincentmajatladi commented Oct 13, 2017

Please add functionality to add feature layers to show features on top of the basemap.

Here is an example of what i did.

In AppConfig.js i added...

                {
                    url: "https://myserver/server/rest/services/layers/MapServer",
                    options: {
                        id: "mapLayer1",
                        imageParameters: {
                             layerIds: [1, 2, 3],
                             layerOption: "show"
                        },
                        opacity: 0.8,
                        showAttribution: false
                    }
                }
            ]

Then in EsriMap.js i added this...

           if (this.mapConfig.customLayers) {
                var customLayers = this.mapConfig.customLayers;
                for (var i = 0; i < customLayers.length; i++) {
                    var customLayer = customLayers[i];
                    var layer;
                    if (customLayer.options && customLayer.options.imageParameters) {
                        var params = new esri.layers.ImageParameters();
                        var keys = Object.keys(customLayer.options.imageParameters);
                        arrayUtil.forEach(keys, function (key) {
                            params[key] = customLayer.options.imageParameters[key];
                        });
                        customLayer.options.imageParameters = params;
                    }
                    layer = new esri.layers.ArcGISDynamicMapServiceLayer(customLayer.url, customLayer.options);
                    if (layer) {
                        this.map.addLayer(layer);
                    }
                }
            }
@vincentmajatladi vincentmajatladi changed the title FeatureLayers Support for FeatureLayers Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant