|
POST
|
Has anyone been successful in getting MapView emit method to work for click or double click in JS API 4.16? I use to programatically fire a click event in 3.x API but I am not having any success in 4.x.
... View more
09-09-2020
07:51 AM
|
2
|
4
|
4244
|
|
POST
|
mapView.popup.selectedFeature.attributes.YourFieldName
... View more
09-09-2020
06:27 AM
|
0
|
4
|
4389
|
|
POST
|
Steve, I see nothing wrong in the code portion you have provided. Can you provide a more complete sample the demonstrates your issue?
... View more
09-09-2020
05:40 AM
|
0
|
0
|
1038
|
|
POST
|
This sample shows how to define the fields of the popup but the content is set by a function which creates the text using the features attributes. So you can set the popups content and choose not to use your test_id field in the popups content. https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=popuptemplate-function
... View more
09-09-2020
05:29 AM
|
1
|
6
|
4389
|
|
POST
|
The better route would be to have a function that is called from the view on click. view.on("click", clickListener);
function clickListener(evt){
let pnt = evt.mapPoint;
// the rest of your on click code
}
...
search.on('search-complete', function (result) {
const mp = result.results[0].results[0].feature.geometry;
clickListener({mapPoint: mp});
});
... View more
09-09-2020
05:22 AM
|
2
|
1
|
6757
|
|
POST
|
See this thread. https://community.esri.com/thread/204842-labels-work-in-wab-de-but-not-in-deployed-site
... View more
09-09-2020
05:08 AM
|
0
|
0
|
1385
|
|
POST
|
Yiqun, A couple of things about your code does not make sense. You are adding the event listener "view on click" inside the listener for search complete so this would not take affect until you do your second search. Why are you wanting to emit a view click event? What is your goal? Also you had in your code map.emit("click". I forgot to change that to view.emit("click"
... View more
09-08-2020
12:14 PM
|
2
|
3
|
6757
|
|
POST
|
OK. That is why this question did not make sense. That screenshot is from AGOL Map Viewer, when you are editing the web map in WAB. It actually has nothing to do with WAB. I will put a mention of ArcGIS Online space where someone can probably answer this question. ArcGIS Online
... View more
09-08-2020
09:22 AM
|
0
|
4
|
5021
|
|
POST
|
But where in WAB are you talking about. In a widget or the app framework...?
... View more
09-08-2020
08:52 AM
|
0
|
6
|
5021
|
|
POST
|
Michael, In that case then use the defaultPopupTemplateEnabled property you mentioned earlier. https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled this.view.popup.defaultPopupTemplateEnabled = true;
... View more
09-08-2020
08:01 AM
|
2
|
1
|
2944
|
|
POST
|
What exactly do you mean by I have added about a dozen custom images in Web Appbuilder ?
... View more
09-08-2020
07:57 AM
|
0
|
8
|
5021
|
|
POST
|
Michael, This 4.x sample shows what you need to do to get a table like display in a popup. https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=intro-popuptemplate
... View more
09-08-2020
07:20 AM
|
2
|
3
|
2944
|
|
POST
|
The esri Proxy will handle this. https://community.esri.com/groups/technical-support/blog/2015/10/28/setting-up-a-proxy-with-web-appbuilder-for-arcgis-developer-edition
... View more
09-08-2020
07:13 AM
|
0
|
0
|
1231
|
|
POST
|
When I tested that service using 4.16 it worked but it took about a minute to finally draw on the map because of the rivers. If specify only the Canals sublayer it is much quicker. var layer = new WMSLayer({ url: "https://catalogue.ceh.ac.uk/maps/a78c90a2-8da4-4f0a-9c6a-c1d1a4a3c2b0", sublayers: [ { name: "HY.PhysicalWaters.WaterBodies.Canals" } ] });
... View more
09-08-2020
07:09 AM
|
2
|
0
|
2109
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 17 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-08-2026
06:27 AM
|