|
POST
|
Hi there, According to this doc, you can only access the places service if you have an ArcGIS Developer account. ArcGIS Online accounts are not supported. You also need to enable to the Places service for your api key. To do it, edit your API key and enable Places service. Then try our the places tutorial
... View more
01-30-2024
04:07 PM
|
0
|
1
|
1771
|
|
POST
|
Hi there, I updated the features widget sample to allow users select features from a layer using a rectangle user draws on the map and display the popup info in Features widget. Hope you can use as a starting point: https://codepen.io/U_B_U/pen/JjzpNjx?editors=1000 The main part to pay attention to is the following, where you query the features from the layer view once user provides the spatial geometry. Then to pass the filtered features to the Features widget's features property when calling its open method. layerView.queryFeatures(query).then((results) => {
if (results.features.length === 0) {
return;
} else {
featuresWidget.open({
location: event.mapPoint,
features: results.features
});
}
});
... View more
01-30-2024
09:01 AM
|
0
|
1
|
1484
|
|
POST
|
Hi there, You could do this with the use of client-side StreamLayer. This sample shows you how you can do this.
... View more
01-25-2024
07:17 AM
|
2
|
1
|
1217
|
|
POST
|
Hi there, Do you have data with two date fields like opening and close dates? If so then you can filter your data based on the closing dates whenever timeSlider.timeExtent changes as shown below: timeSlider.watch("timeExtent", () => {
const closedDate = timeSlider.timeExtent.start.getTime();
const where = `perimeterdatetime = ${closedDate}`;
layerView.filter = new FeatureFilter({
where
});
}); The following demo app shows how it can be done. Here is the live app:https://ubatsukh.github.io/arcgis-js-api-demos/devsummit2021/fire-perimeter/ Here is the code: https://github.com/ubatsukh/arcgis-js-api-demos/tree/master/devsummit2021/fire-perimeter Hope this helps
... View more
01-24-2024
08:21 AM
|
2
|
1
|
950
|
|
POST
|
Hi there, You mean something like this? https://codepen.io/U_B_U/pen/oNVGzqX?editors=1000
... View more
01-24-2024
08:13 AM
|
0
|
0
|
1009
|
|
POST
|
Hi there, You could listen to the pointer-up event on the timeSlider div to achieve what you are trying to do. Here is a codepen showing how it is done. https://codepen.io/U_B_U/pen/abMJdaL?editors=1000 The following is the how you can do it. document.getElementById("timeSlider").addEventListener("pointerup",(event) => {
console.log("here is your time extent", timeSlider.timeExtent);
}); You could also debounce when watching timeExtent using the debounce function technique mentioned in this article: JavaScript Debounce Function (davidwalsh.name) Hope this helps, -Undral
... View more
01-16-2024
03:11 PM
|
1
|
0
|
1570
|
|
POST
|
Hi there, You can create different elements to be displayed in popupTemplate's content. You can learn more about custom content from here. In this case we are creating a custom content to host the HTML button. Trigger action is different from opening the popup. Trigger action is an event that fires in response to user clicks an action. This sample shows how to create custom actions for your popupTemplate. The action buttons are displayed like so in the popup. The codepen was using deprecated method view.popup.open. I have updated the codepen to use MapView.openPopup method. We are passing the features parameter to the openPopup method so that the popup displays the popupTemplate associated with the graphics. Please take a look at the links I included in this response to learn about different parts of working with popup.
... View more
01-12-2024
08:06 AM
|
1
|
0
|
4038
|
|
POST
|
Hi there, Please check out this post as it discusses about adding button to popupTemplate. I have updated the app to work with 4.28: https://codepen.io/U_B_U/pen/KKENPpZ?editors=1000
... View more
01-11-2024
08:07 PM
|
1
|
1
|
4119
|
|
POST
|
WebTileLayer's spatialReference is 102100. Looks like you are working with WMTS service (https://wmts.nlsc.gov.tw/97/wmts/). So I would add the layer as WMTSLayer as shown below. const layer = new WMTSLayer({
url: "https://wmts.nlsc.gov.tw/97/wmts"
extent: {
xmin: 128548.4443375419,
ymin: 2394066.4166165744,
xmax: 606875.5521,
ymax: 2919551.2968000006,
spatialReference: { wkid: 3826 }
}
});
const map = new Map({
layers: [layer]
});
const view = new MapView({
container: "viewDiv",
map: map,
spatialReference: { wkid: 3826 },
});
... View more
12-29-2023
09:01 AM
|
1
|
0
|
963
|
|
POST
|
Hi there, FeatureLayer's outFields property has a wrong casing in your code. Please change it from outfields: ["id"], to outFields: ["id"], Then it should work as expected.
... View more
12-28-2023
02:16 PM
|
0
|
1
|
748
|
|
POST
|
Hi there, You need to specify the spatialReference for the view's extent as the following: var view = new MapView({
container: "divmap",
map: map,
zoom: 3,
extent: {
xmin: 296938.73458000005,
ymin: 2776832.77203,
xmax: 301876.2566600001,
ymax: 2781271.34259,
spatialReference: {
wkid: 102443
}
},
crossOrigin: 'anonymous',
spatialReference: {
wkid: 102443
}
});
... View more
12-28-2023
02:03 PM
|
0
|
0
|
902
|
|
POST
|
Hi there, Ah yes this is a known issue at 4.28. This issue will be addressed in 4.29 and the fix is already in `next`. You can update your codepen to point to <script src="https://js.arcgis.com/next/"></script> to check the fix. Hope this helps,
... View more
12-18-2023
11:11 AM
|
0
|
0
|
1666
|
|
POST
|
You are getting this error likely because the field you are running the query on does not exist on the layer or the layer view. Try setting the FeatureLayer.outFields property to include the fields you want to work with.
... View more
12-12-2023
01:18 PM
|
0
|
1
|
1724
|
|
POST
|
That is because I posted a wrong link. Sorry about that. Here is the right link: https://codepen.io/U_B_U/pen/VwgGBPM
... View more
11-29-2023
11:54 AM
|
1
|
0
|
1371
|
|
POST
|
It should work like any other layer. Here is a simple example: https://codepen.io/U_B_U/pen/VwgGBPM
... View more
11-29-2023
09:51 AM
|
0
|
0
|
1457
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2025 03:29 PM | |
| 1 | 07-09-2025 08:48 AM | |
| 2 | 07-08-2025 08:09 AM | |
| 2 | 07-07-2025 03:57 PM | |
| 1 | 06-11-2025 03:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-01-2025
08:03 AM
|