|
POST
|
Hi there, What problem are you running into? Are you getting errors? Or the projection is incorrect? The one I can see from the code snippet is that the spatialReference is not being set on the point you are passing into project method. You can directly pass in the event.mapPoint to the projection method or try setting the spatial reference of the point as shown below before you pass it into projection method. let point = new Point({
x: event.mapPoint.x,
y: event.mapPoint.y,
spatialReference: WGS84
});
... View more
04-15-2021
04:08 PM
|
1
|
0
|
4718
|
|
POST
|
That is because the RoutResult class does not have a property called routeResults. Please take a look at the SDK doc for RouteResult and modify your code.
... View more
04-15-2021
03:48 PM
|
0
|
5
|
3853
|
|
POST
|
Hi there, This approach appears to be working. I updated the test app to showcase this. The following is the gist of it. var randomDates = [
new Date(2021, 0, 11, 13, 52, 59, 452),
new Date(2021, 0, 11, 13, 32, 58, 956),
new Date(2021, 0, 12, 13, 55, 33, 216),
new Date(2021, 0, 11, 14, 02, 56, 873),
new Date(2021, 0, 11, 14, 22, 44, 315),
new Date(2021, 0, 11, 14, 44, 21, 273),
new Date(2021, 0, 11, 15, 02, 24, 093),
new Date(2021, 0, 11, 17, 49, 56, 344),
new Date(2021, 0, 12, 1, 08, 45, 504),
new Date(2021, 0, 12, 1, 54, 36, 290),
new Date(2021, 0, 12, 8, 31, 16, 087),
new Date(2021, 0, 11, 16, 34, 05, 781),
new Date(2000, 0, 11, 16, 36, 11, 802),
];
var date_sort_asc = function (date1, date2) {
if (date1 > date2) return 1;
if (date1 < date2) return -1;
return 0;
};
randomDates.sort(date_sort_asc);
randomDates.forEach(function(dt){
console.log(dt.toLocaleString())
});
... View more
04-15-2021
03:37 PM
|
0
|
2
|
2854
|
|
POST
|
Hi Logan, You should not have to call `FeatureLayer.refresh()` as applyEdits takes care of it. Are you sure that your applyEdits operation is running successfully? I have updated the bulk edits test app that I created for you from dev summit. I configured the popupTemplate of the layer and you can see that the attributes are updated after applyEdits is called. -Undral
... View more
04-15-2021
01:17 PM
|
0
|
3
|
3408
|
|
POST
|
Looks like you are using TypeScript. Autocasting is not allowed unless you are setting parameters in the class constructor. The following code needs to be update. See the updated code right below it. result.route.symbol = {
type: 'simple-line',
color: [5, 150, 255],
width: 3
};
// IMPORT THE FOLLOWING MODULE
import SimpleLineSymbol = require("esri/symbols/SimpleLineSymbol");
// Then CHANGE YOUR CODE TO
result.route.symbol = new SimpleLineSymbol({
color: [5, 150, 255],
width: 3
}); As for this error: Cannot assign to 'classList' because it is a read-only property. The following code is the problem. See the fix right below it. const directions = document.createElement('ol');
directions.classList = 'esri-widget esri-widget--panel esri-directions__scroller';
// NEEDS TO BE CHANGED TO
directions.classList.add("esri-widget", "esri-widget--panel", "esri-directions__scroller");
... View more
04-15-2021
10:56 AM
|
1
|
7
|
3864
|
|
POST
|
Hi there, From what I can see you are using the RouteTask module to call solve like this RouteTask.solve(). Solve is not a static method on RouteTask. Have you created a new instance of the RouteTask? Use the instance of RouteTask to call the solve method. This sample shows how to set up RouteTask: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=tasks-route Hope that is the issue. -Undral
... View more
04-14-2021
12:47 PM
|
0
|
10
|
3889
|
|
POST
|
Hi there, Looks like you are not setting fields schema for your feature collection. It should work as expected once you define the fields for the layer. So do something like the following: sourceLayer = new FeatureLayer({
title: "Sources",
outfields: ["*"],
source: collection,
objectIdField: "ObjectID",
labelingInfo: [labelClass],
renderer: { type: "simple", symbol: sourceSymbol },
fields: [{
name: "ObjectID",
alias: "ObjectID",
type: "oid"
},
{
name: "NAME",
alias: "Name",
type: "string"
},
{
name: "DESCRIPTION",
alias: "Type Description,
type: "string"
}]
}); Hope this works, -Undral
... View more
04-14-2021
12:28 PM
|
1
|
2
|
5375
|
|
POST
|
Hi there, From what I can see the grade filter is working as expected. For example, grade = 'E1' returns only one feature from the service as well. So the client-side filtering matches the server result in this case. As for filtering features based both on grade and major values you can do the following were you can dynamically populate the values for the grade as you are doing in your app. majorCommandView.filter = {
where: `macom = '${selectedCommand}' AND grade = 'E6'`,
}; -Undral
... View more
04-14-2021
09:31 AM
|
0
|
0
|
1422
|
|
POST
|
Hi there, You maybe better of using DictionaryRenderer in this case. Here is a sample that shows how to use dictionary renderer: https://developers.arcgis.com/javascript/latest/sample-code/visualization-dictionary/
... View more
04-13-2021
11:35 AM
|
2
|
1
|
5411
|
|
POST
|
Hi there, It is fixed to 20 features at 4.19. I have created an enhancement request for this to be able to adjust this number. I will update you when this is installed. -Undral
... View more
04-13-2021
11:33 AM
|
1
|
0
|
6178
|
|
POST
|
Hi there, This should work as long as you are NOT using animated svg. Please take a look at the known limitation for PictureMarkerSymbol for svg limitations. If you are using animated svg... then it will not work as stated in the known limitation. You can instead use animated png or webp formats. In any case, the svg you provided is not working. You can do it as shown below: const featureLayer = new FeatureLayer({
url:
"https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0",
renderer: {
type: "simple",
symbol: {
type: "picture-marker",
url:
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTI2cHgiIGhlaWdodD0iMTI2cHgiIHZpZXdCb3g9IjAgMCAxMjYgMTI2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMjYgMTI2IiB4bWw6c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DYtMS40Ni0xLjQ2aC0xOWMtMC44MDcsMC0xLjQ2LDAuNjUzLTEuNDYsMS40NnY2LjExNUg2OC43MzRjLTAuODA3LDAtMS40NiwwLjY1My0xLjQ2LDEuNDU5Vjc5LjQ0DQoJCUM2Ny4yNzQsODAuMjQ3LDY3LjkyNyw4MC45LDY4LjczNCw4MC45eiBNODYuNjM4LDEyLjg5aDEzLjEzOXYzLjE4Nkg4Ni42MzhWMTIuODl6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==",
height: "32px",
width: "32px"
}
}
});
... View more
04-13-2021
10:49 AM
|
0
|
5
|
5423
|
|
POST
|
Hi there, Not sure if this simple test app showcases what you are after. In this app, I have only one feature layer in the app and add the list of all features available right under the layer by setting LayerList.listItemCreatedFunction. You can click on the feature in layer list and it will only display that feature on map. We have several samples that shows how to use listItemCreatedFunction for LayerList. You can hide layers from a layer list by setting the layer's listMode property to hide (all layers have this property. Hope this helps, -Undral
... View more
04-12-2021
04:15 PM
|
1
|
0
|
2369
|
|
POST
|
Hi there, There are several ways of doing this. I created a simple app for you to show how to get all unique date values from your FeatureLayer and create date arrays. This way, your app should pick all changes when your layer updates. In the app, I am waiting for the layer to load then I am getting all unique values from the date field using smarting mapping uniqueValues module as shown below. Then I loop through the date values and add them to dates array. Use the date array to set the TimeSlider.stops and fullTimeExtent. view.whenLayerView(layer).then(function (lv) {
// get unique values from the date field
uniqueValues({
layer: layer,
field: "perimeterdatetime"
}).then(function (response) {
let infos = response.uniqueValueInfos;
infos.forEach(function (info) {
const dt = new Date(info.value);
dates.push(dt);
});
timeSlider.stops = { dates };
timeSlider.fullTimeExtent = {
start: dates[0],
end: dates[dates.length - 1]
};
const start = dates[0].getTime();
const where = `perimeterdatetime = ${start}`;
layerView = lv;
layerView.filter = {
where
};
});
}); Hope this helps, -Undral
... View more
04-12-2021
03:15 PM
|
3
|
5
|
2879
|
|
POST
|
Hi there, We changed the behavior you described at 4.19 to fetch 20 features at a time for a popup. So the performance will be better if you upgrade to 4.19. 4.19 will be released at the end of April. You can already test your app by pointing to next version as shown below: <link rel="stylesheet" href="https://js.arcgis.com/next/esri/themes/light/main.css"/>
<script src="https://js.arcgis.com/next/"></script> Hope this helps, -Undral
... View more
04-12-2021
02:18 PM
|
0
|
3
|
6192
|
|
POST
|
You Hi there, You should set the style on html elements like div, p, span etc. The following will work for example: var template = {
// autocasts as new PopupTemplate()
title: "{NAME} in {COUNTY}",
content: '<div style="font-family:Garamond;font-size:26px"><i>content</i></div>'
};
... View more
04-12-2021
02:02 PM
|
1
|
1
|
3880
|
| 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
|