|
POST
|
Good Day I have a situation where I need to hide several features in the Stream Layer, but I can't set a definitionExpression, so I'm setting the layer's featureEffect: const featureFilter = new FeatureFilter({
where: featureQuery
});
layer.layer.featureEffect = new FeatureEffect({
filter: featureFilter,
excludedEffect: "opacity(0%)"
}); This works, and the features “disappear”. The issue I have, they still respond to the “hitTest”, so if I have a sketchWidget active and do something like: this.sketchWidgetPointerUpEvent = this._view.on("pointer-up", (event) => {
this._view.hitTest(event).then(async (response) => {
if (response.results.length && this.lassoSet) {
this.lassoSet = false;
this._view.graphics.removeAll();
const geometries = response.results.map((graphic, index: number) => {
if (graphic.graphic.geometry) {
return graphic.graphic.geometry
}
});
const queryGeometry = await geometryEngineAsync.union(geometries);
this.selectFeatures(queryGeometry);
}
});
}); My question is, how do I stop the excluded features from being selectable? Is there a better way to query the features, and I don't think using the layerView.queryFeatures would work because that would only consider what's in the active view, not what is outside the view? Is there a way to look at the effect of the feature? If I do use layerView.queryFeatures, could I force it to look at the entire map instead of the view (I don't think so). Thanks for any help provided. Thanks
... View more
04-01-2025
02:34 PM
|
0
|
3
|
402
|
|
POST
|
That's precisely what I'm trying to do! Thanks for the help
... View more
03-18-2025
11:15 AM
|
1
|
0
|
637
|
|
POST
|
Good Afternoon I think I finally found the issue! To make sure I run the progress spinner until features are on the map, I'm using an interval to carry out the following steps (generalized): 1. Wait for the Layer View 2. Build a query to find features in the Layer View 3. Run "queryFeatures" 4. If the feature count returned is >= 1, then stop the spinner. The issue is if my view extent doesn't contain any features it won't get updated, because if I zoom out they pop in. if I have the following code: const query = {
geometry: this._view.extent.clone().expand(100),
outFields: ['*'],
where: '1=1'
}
layerView.queryFeatures(query).then((features) => {
if (features.features.length) {
clearInterval(waitForFeatures)
this.layerLoadedEvent.emit(true);
}
}) How can I check the entire map? Thanks
... View more
03-14-2025
12:56 PM
|
0
|
2
|
653
|
|
POST
|
So the output I posted is returned to the StreamLayer from the Web Socket, and all the other layers have the same structure, so I'm perplexed. The render setting seems fine, the geometry seems fine, the attributes, and fields seem valid, so do you know if there's away to get better logging information from the StreamLayer? When I look at Load Warnings or Load Errors, I have none, which would tell me the data was / is fine because I don't know what else to take from that. I would suspect something must provide me debugging information as the features are loaded from the Web Socket into the StreamLayer. Thanks
... View more
02-21-2025
06:59 AM
|
0
|
0
|
773
|
|
POST
|
Good Day I'm confused about this issue, I have a websocket that is returning data to me. ex: {
features:[{
"geometry": {
"x": -8841036.030462436,
"y": 5471327.551341704
},
"attributes": {
"objectId": 31311,
"assetTypeId": 14,
"assetSectionId": 31311,
"assetId": "ST3472",
"name": "Silly Face Circle",
"gisId": "ST11111",
"assetStatus": "In-service",
"installationYear": 2010,
"replacementCost": 8800,
"replacementCostYear": 2021,
"costAdjustmentFactor": 1,
"fixedCost": 0,
"exclude": "No",
"material": "Something",
"count": 1,
"owner": "Me",
"condition": 86.3,
"sl": "80.00",
"rsl": "69.00",
"decisionClass": "Something Something",
"degradationClass": "Something Something",
"performanceClass": "blah - face,
"criticality": 50,
"risk": 6
}
}],
type: "features"
} I have the fields setup as: [
{
"name": "objectId",
"alias": "objectId",
"type": "oid"
},
{
"name": "assetTypeId",
"alias": "assetTypeId",
"type": "double"
},
{
"name": "assetSectionId",
"alias": "assetSectionId",
"type": "double"
},
{
"name": "assetId",
"alias": "assetId",
"type": "string"
},
{
"name": "gisId",
"alias": "gisId",
"type": "string"
},
{
"name": "name",
"alias": "name",
"type": "string"
},
{
"name": "assetStatus",
"alias": "assetStatus",
"type": "string"
},
{
"name": "installationYear",
"alias": "installationYear",
"type": "double"
},
{
"name": "length",
"alias": "length",
"type": "double"
},
{
"name": "area",
"alias": "area",
"type": "double"
},
{
"name": "volume",
"alias": "volume",
"type": "double"
},
{
"name": "quantity",
"alias": "quantity",
"type": "double"
},
{
"name": "replacementCost",
"alias": "replacementCost",
"type": "double"
},
{
"name": "replacementCostYear",
"alias": "replacementCostYear",
"type": "double"
},
{
"name": "costAdjustmentFactor",
"alias": "costAdjustmentFactor",
"type": "double"
},
{
"name": "fixedCost",
"alias": "fixedCost",
"type": "double"
},
{
"name": "exclude",
"alias": "exclude",
"type": "string"
},
{
"name": "zone",
"alias": "zone",
"type": "string"
},
{
"name": "diameter",
"alias": "diameter",
"type": "double"
},
{
"name": "depth",
"alias": "depth",
"type": "double"
},
{
"name": "rimElevation",
"alias": "rimElevation",
"type": "double"
},
{
"name": "coverDiameter",
"alias": "coverDiameter",
"type": "double"
},
{
"name": "numberofPipesIn",
"alias": "numberofPipesIn",
"type": "double"
},
{
"name": "numberofPipesOut",
"alias": "numberofPipesOut",
"type": "double"
},
{
"name": "soilType",
"alias": "soilType",
"type": "string"
},
{
"name": "soilCondition",
"alias": "soilCondition",
"type": "string"
},
{
"name": "classification",
"alias": "classification",
"type": "string"
},
{
"name": "material",
"alias": "material",
"type": "string"
},
{
"name": "roadsideEnvironment",
"alias": "roadsideEnvironment",
"type": "string"
},
{
"name": "functionalClass",
"alias": "functionalClass",
"type": "string"
},
{
"name": "coverType",
"alias": "coverType",
"type": "string"
},
{
"name": "serviceType",
"alias": "serviceType",
"type": "string"
},
{
"name": "overflowWeir",
"alias": "overflowWeir",
"type": "string"
},
{
"name": "risk",
"alias": "risk",
"type": "double"
},
{
"name": "criticality",
"alias": "criticality",
"type": "double"
},
{
"name": "performanceClass",
"alias": "performanceClass",
"type": "string"
},
{
"name": "decisionClass",
"alias": "decisionClass",
"type": "string"
},
{
"name": "initialCost",
"alias": "initialCost",
"type": "double"
},
{
"name": "defectFlag",
"alias": "defectFlag",
"type": "string"
},
{
"name": "count",
"alias": "count",
"type": "double"
},
{
"name": "owner",
"alias": "owner",
"type": "string"
},
{
"name": "showOnCapitalPlan",
"alias": "showOnCapitalPlan",
"type": "string"
},
{
"name": "groupIDCorridorID",
"alias": "groupIDCorridorID",
"type": "string"
},
{
"name": "degradationClass",
"alias": "degradationClass",
"type": "string"
},
{
"name": "formulaGroup",
"alias": "formulaGroup",
"type": "string"
},
{
"name": "condition",
"alias": "condition",
"type": "double"
},
{
"name": "sl",
"alias": "sl",
"type": "double"
},
{
"name": "rsl",
"alias": "rsl",
"type": "double"
}
] The StreamLayer object is: return new StreamLayer({
fields: fields,
geometryType: geometry,
id: streamLayerId,
maxReconnectionAttempts: 500,
maxReconnectionInterval: 500,
objectIdField: 'objectId',
renderer: renderSetting,
timeInfo: {
trackIdField: "assetSectionId"
},
webSocketUrl: `${webSocketAPI}api/MapStream/stream`
}) Which is how I'm creating 20+ other layers that show up correctly. This one layer won't show up, doesn't list any features, and it should have ~3000, BUT, doesn't list any errors, or warnings, and will return it's "Loaded". Is there any way to get additional information? I'm assuming something in the data is bad, but shouldn't that generate a warning or error? in loadWarings / loadErrors? Thanks for any help Cheers
... View more
02-19-2025
10:12 AM
|
0
|
6
|
824
|
|
POST
|
Possible, it stopped complaining about the % sign when I did that, fields that don't have % sign are rendering properly, but I can't get %blah to show up correctly.
... View more
02-14-2025
10:13 AM
|
0
|
0
|
527
|
|
POST
|
Good Day I have a field that starts with a % sign %blah, inside a value expression can I use that value escaped? Something like: When($feature.%blah <= 0) If I leave the % sign, I get an error, and I can't find any information on escaping the % sign, is it possible? Thanks
... View more
02-14-2025
09:59 AM
|
0
|
2
|
532
|
|
POST
|
Figured out the issue, apparently the "TRACKID" has to be unique between feature additions, which I was unaware of. I thought it worked like an Object ID, but it doesn't. After randomizing the Track ID, now it's fine. That should be added into the documentation 🙂
... View more
12-11-2024
10:22 AM
|
0
|
0
|
1462
|
|
POST
|
Good Day I'm having a new issue, when I change the extent of the view, such as zoom in / out. I first want to clear all the existing features from the layers, then grab the new features. Assuming I have a polygon of the extent, if I call: layers.forEach((layerObject) => {
const layer = layerObject.layer;
layer.sendMessageToClient({
type: "clear"
})
}) Before doing: layers.forEach((layer) => {
if (layer.layer) {
layer.layer.sendMessageToSocket({
asset: layer.assetTypeId,
boundingPolygon
})
}
}) The question is: How do I wait until the clear is complete, before trying to grab the features? If I can do that, then the load on the map will be greatly reduced. Thanks
... View more
12-11-2024
08:20 AM
|
0
|
1
|
1471
|
|
POST
|
Brilliant, that's what I figured was going on, that makes sense 🙂 — Thanks for the explanation.
... View more
12-05-2024
10:03 AM
|
0
|
0
|
1560
|
|
POST
|
Hey I've managed to get a Stream Layer stood up with a web socket that is handling 400 000 features at ~1 GB of memory. What I don't understand, when I made 200 000 features using a “normal” Feature Layer it uses ~4 GB of memory, but fundamentally, what's really different? I wrote the web socket server using GO, it's very basic, but once the features are streamed, shouldn't the memory even out? I can't grasp how the Stream Layer is using 1/4 of the memory for twice the amount. Since I'm going to be asked why the memory is so drastically different, is it possible to get a clear explaination as to why?
... View more
12-04-2024
02:30 PM
|
0
|
5
|
1599
|
|
POST
|
Awesome, I'll take a look, thanks for the suggestion!
... View more
12-03-2024
08:31 AM
|
0
|
0
|
1629
|
|
POST
|
Good Day I know this has been brought up before, but I'm in a new bind. We have clients who want to show hundreds of thousands of features on our maps. We use multiple endpoints to build the map features, mainly two endpoints, one which has all the attribute data, and one that has the geometry data. Those are stored separately because the attribute data is fairly dynamic and can quickly change. As far as I'm aware, we can't use a hosted feature layer because there is no method to quickly and dynamically upload / update an attribute on the fly, and have it tie back into the render setting. This leaves us with having to build our maps on the client side, and render them in place. The issue is that building and rendering features on the client side takes memory, and when we get into the range of 100 000+, a lot of memory. I've had requests to show upwards of 500 000, and not matter how much I push back and say it's a dumb idea, people don't care. Is there any methodology to render massive feature counts and build the feature client side? Is there any way to quickly destroy and build features, if such a thing would work? Thanks
... View more
12-02-2024
10:40 AM
|
0
|
9
|
1690
|
|
POST
|
Good Day I'm being asked about LRS support in ArcGIS JS, when I looked that up I came across ArcGIS Roads and Highways. Would LRS be something that is supported in ArcGIS JS? Thanks
... View more
10-10-2024
07:26 AM
|
0
|
0
|
315
|
|
POST
|
Good Day Thanks for the reply, I ended up calling goTo() to "zoom out", which allows the data to render properly. Thanks
... View more
07-22-2024
11:20 AM
|
0
|
0
|
770
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-25-2025 07:33 AM | |
| 1 | 03-18-2025 11:15 AM | |
| 1 | 10-07-2022 08:14 AM | |
| 1 | 08-25-2023 10:47 AM | |
| 1 | 02-23-2023 08:22 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-24-2025
07:12 AM
|