New answers tagged

3

Unfortunately, cloneNode will not copy image data from a canvas. A possible solution is to use the Views takeScreenshot method to copy the imageData from the map and then add it to the copied canvas. var canvas = domClone.querySelector("canvas"); $printSection.appendChild(domClone); return view .takeScreenshot({ area: { ignorePadding: false ...


1

It seems like it has to do with your css rule: body * { visibility:hidden; } When you remove that, the map shows up. So does the non-modal content though, so I think the solution is to find a more fine-grained CSS rule to hide the background but not the map.


0

So, after some digging I now found out that this seems to be a bug by ESRI. Since our experiences with issues like that, there ESRI stated a "won't fix" even if they approved the issue as bug, I won't make the effort to report it. Expectation is again a "won't fix"... it's not worth the time. For all others running into this issue I will describe it here: ...


1

I will assume that you are using the 4.x version of the API since it seems GeoJSONLayer was implemented in 4.11. Remember that you have to define the modules and classes you will use on top of your script. I see you are calling several modules and classes but GeoJsonLayer is not listed (hence the error you are getting). If you take a look at the ...


1

Since you're using WAB, I guess you have a WebMap. Then you can customize the Popup directly in your WebMap using Arcade and get information from a related table using a custom attribute expression. Here general info about customizing your Popup using arcade Here you have info about getting info from another layers You're attribute expression would be ...


0

I'm not sure I totally understand what you're looking for, but I have been able to customize popups from the underlying web map (as opposed to from within the web app builder). I think you should be able to configured popups from each layer's drop-down menu.


2

We resolved the issue by JSON.stringfy() the parameter. inputLayers: JSON.stringify([ { url: soilURL, serviceToken: user.creds.token }, ]),


0

You need to add a lang.hitch to the line this.gpLr.getResultData(jobinfo.jobId, "Output_Layer", function (results) { so it's like this this.gpLr.getResultData(jobinfo.jobId, "Output_Layer", lang.hitch(this, function (results) {


0

If the scope in the callback function (lang.hitch) is not the problem try to access the map object using: var map = this.wabWidget.map; inside your function. I once had this problem. gpLrJobComplete: function (jobinfo) { var map = this.wabWidget.map; //and then add layers map.addLayer(resultLayer); }, If you are ...


0

Calling queryTask.execute(params) returns a promise, in order to handle the results, read the results via the then clause queryTask.execute(query).then(function(results){ console.log(results.features); });


0

Use the featureLayer's method applyEdits EDIT: The applyEdits method is used to apply updates/additions and data deletion to a FeatureLayer. From the link above: If client-side features are added, removed or updated at runtime using applyEdits() then use queryFeatures() to return updated features.


1

The property you want to look into is the legendResponse of each layer. console.log(operationalLayer1); if you log individual layers property you will find legendResponse on the list of properties. If you can access it on your script and able to change the layerName property it will be reflected on you map. I once did it in Web AppBuilder for developer ...


1

If you look at the 3.x to 4.x Functionality Matrix, it says ColorPicker is "coming soon": So one option would be to wait until it's included. If that is not an option, I am not aware of a great way to use the 3.x ColorPicker on the same page that the 4.x API is included - I would probably just use the default HTML Color input in the mean time or some other ...


1

There isn't any sort of capability in 3.x to provide group layers. This is why ArcGIS Online web maps currently cannot support group layers. The GroupLayer class was introduced in the 4.x API. The only way to have group layers in 3.x is to use map services that are already configured with group layers.


Top 50 recent answers are included