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
|
340
|
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
|
278
|
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
|
585
|
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
|
1574
|
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
|
1655
|
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
|
360
|
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
|
372
|
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
|
329
|
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
|
619
|
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
|
677
|
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
|
428
|
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
|
514
|
POST
|
Nothing changes. Basically update the codepen. Update the app so that the spatialReference of the StreamLayer matches the spatialReference of the view and pass the points in the spatial reference of the view. For example, this sample https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-stream-layer-is-not-working-with-point/m-p/1353942#M82941 passes the coordinates in Web Mercator.
... View more
11-28-2023
08:15 AM
|
0
|
0
|
752
|
POST
|
Hi there, Please take a look at the Add an array for client-side features topic to see the requirements for creating a client side stream layer. In this section, the following is pointed out: Geometries of features added to the StreamLayer must be in the spatial reference of the view, because the layer's spatialReference is always set to the spatial reference of the view. To avoid overhead, the stream layer does not do any additional processing or reprojecting on features as they arrive. Based on this statement, you either need to change the basemap of the map to be in WGS 84 or the StreamLayer projection to match the view's spatialReference. In any case, I updated your app to make couple of changes: https://codepen.io/U_B_U/pen/oNmMoyy?editors=1000 1. First I updated the baseman to be WGS84 basemap 2. Then I updated the geometry of the feature you are adding to use x and y coordinates instead of latitude and longitude. You can see these updates in the codepen I provided above.
... View more
11-27-2023
10:23 AM
|
0
|
1
|
762
|
POST
|
Hi there, I think you are asking if a GeoJSONLayer can be persisted in a webmap. It can and this support was added at version 4.22 - https://developers.arcgis.com/javascript/latest/4.22/#better-support-for-csvlayer-and-geojsonlayer
... View more
11-16-2023
12:59 PM
|
0
|
0
|
364
|
Title | Kudos | Posted |
---|---|---|
1 | 4 weeks ago | |
1 | 09-30-2024 11:06 AM | |
1 | 09-10-2024 02:28 PM | |
1 | 09-09-2024 12:34 PM | |
1 | 08-27-2024 09:08 AM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|