|
POST
|
Good Day I'm trying to bypass the sign-in process to access our host feature layer from the ArcGIS JavaScript API, I tried implementing OAuth, following the guides, and used this: const info = new OAuthInfo({
appId: "<blah>",
popup: false
});
identityManager.registerOAuthInfos([info]); But every time the feature layer load it kicks me over to a sign-in page, and once I sign-in it kicks me back to our application, but to the wrong page and I enter a non-stop loop,. It is possible to use an ApplicationSession and use the Client ID / Client Secret to generate a token, which I can then register to bypass this issue? We have this function for queries: authenticate() {
this._session = new ApplicationSession({
clientId: '<blah>',
clientSecret: '<blah>'
})
} But I don't see any option to attach the authentication parameters to the FeatureLayer URL I looked up this page: https://enterprise.arcgis.com/en/server/latest/administer/windows/about-arcgis-tokens.htm which doesn't explain how to attach or generate the token, unless I'm meant to use the token from the ArcGIS Developer Portal. Thanks
... View more
11-28-2020
08:28 AM
|
0
|
2
|
4646
|
|
POST
|
Good Day This is related to another post I made about mapping 450,000 features onto the map. I moved to using a hosted feature layer, which massively helped the memory usage, but now I'm stuck as the shape file I uploaded to make the hosted feature layer doesn't have much information. Is it possible to add a field / attribute to a feature based on another set of data, on the client side after I grab that hosted feature layer? I have a large object from our DB that has colours, labels and etc... in it for the 450,000 features, one of those fields matches a value in the hosted layer, Objectdd = Objectd. When I create the renderer for the hosted feature layer I'd like to add a field / attribute into the feature so I know what it is, and later use it as a query point is this possible? Thanks
... View more
11-27-2020
01:00 PM
|
0
|
0
|
831
|
|
POST
|
Good Day I have a massive data collection of ~450, 000 features that I'm mapping on to 18 feature layers using "bins" of 25,000 features / feature layer. The following code generates those feature layers and after it runs I have 18 layers comprising my ~450, 000 features. createFeatureLayers() {
return new Promise( (r) => {
for (const prop in this._geoData) {
if (this._geoData.hasOwnProperty(prop)) {
console.time('forLoop');
for (const geometryProp in this._geoData[prop]) {
if (this._geoData[prop].hasOwnProperty(geometryProp)) {
for (const binProp in this._geoData[prop][geometryProp]) {
if (this._geoData[prop][geometryProp].hasOwnProperty(binProp)) {
const buildFeatureLayers = true;
if (buildFeatureLayers) {
const data = this._geoData[prop][geometryProp][binProp];
if (data.length > 0) {
switch (geometryProp) {
case 'lines':
const featureLayer =
this.buildFeatureSettings(data, '#000000');
if (featureLayer) {
this._layers[prop].lines[binProp] =
new this.FeatureLayer(featureLayer);
this._layers[prop].lines[binProp].maxScale = 0;
this._layers[prop].lines[binProp].minScale = 3000000;
}
break;
default:
break;
}
}
}
}
}
}
this._geoDataKeyIndex++;
}
console.timeEnd('forLoop');
}
}
})
}
buildFeatureSettings(data, colour) {
return {
source: data,
renderer: this.buildRenderSettings(data, colour),
fields: this._fields,
outFields: ['*'],
objectIdField: 'ObjectID',
geometryType: 'polyline',
spatialReference: {
wkid: 4326
},
};
}
buildRenderSettings(data, colour: string) {
return {
type: 'simple',
symbol: {
type: 'simple-line',
size: 30,
width: 3,
color: colour,
outline: {
width: 4,
color: colour,
}
},
}
}
} Once it's mapped onto my map view, the memory usage approximately doubles. What is the recommended way to handle massive data sets? Are there methods available that will remove features from the map view if they're not the current stationary view? Are there methods that will automatically add them? Thanks
... View more
11-25-2020
11:21 AM
|
0
|
3
|
1802
|
|
POST
|
Good Day Thanks for the reply, the issue is in ArcGIS API JavaScript 4.17, although I've seen this in 4.15 and 4.16. I tried playing around with the createRenderer function like so: this.smartMapper.createRenderer({
layer: this._layers[prop].polygons,
view: this._view,
outlineOptimizationEnabled: true,
sizeOptimizationEnabled: true
}).then((res) => {
console.log('Res from Smart Mapper');
console.log(res);
const renderOverride = true;
if (renderOverride) {
const renderer = res.renderer;
const rgbObj = this.hexToRGB(colour);
renderer.symbol.color = 'dodgerblue';
renderer.symbol.color = [rgbObj.r, rgbObj.g, rgbObj.b, 0.3];
renderer.symbol.outline.color = [rgbObj.r, rgbObj.g, rgbObj.b, 1];
this._layers[prop].polygons.renderer = renderer;
}
}).catch((error) => {
console.log('Smart Mapper Render Error');
console.log(error);
}) But it didn't work, at least my polygons never scaled properly with the zoom. The default render settings I use are: type: 'simple',
symbol: {
type: 'simple-fill',
size: 30,
opacity: .7,
color: [rgbObj.r, rgbObj.g, rgbObj.b, 0.3],
outline: {
width: 2,
color: [rgbObj.r, rgbObj.g, rgbObj.b, 1],
}
} For the points I use basically the same settings with the render using a simple / picture marker and a few of the internal settings changed, but essentially the same. Thanks
... View more
11-13-2020
06:32 AM
|
0
|
0
|
2586
|
|
POST
|
Good Day Is it possible to change the polygon / polyline size based on zoom? When I have points and I zoom out they're still visible, but when I have polygons / polylines they disappear when I zoom out, which is no ideal, as I have data spread over Canada. vs At this zoom level the polygon data should appear by Toronto, and get more accurate when we zoom in.
... View more
11-10-2020
02:00 PM
|
0
|
2
|
2618
|
|
POST
|
Fair enough If the test code looks fine, then there's no reason to assume our production code would have any issue, as the test code is just a simplified version. I'll admit it's not idea to look at system memory, but I think it can be helpful, but as you pointed out that opens up many, many more possible memory issues. Best thing we can do is a long run test and see how it operates / handles over the next couple weeks. Thanks for you help
... View more
10-21-2020
01:08 PM
|
1
|
0
|
3391
|
|
POST
|
Good Day My apologizes, I was exceedingly unclear. When I mentioned I saw the memory climb, I was talking about the system monitor on my OS, the first screenshots are taken using the development repo, then I switched to our production version to get a much bigger network loaded. The first picture is sitting on the dashboard before loading a map: After loading 1 map and going back to the dashboard; After cycling that 5 more times, so I've loaded the map 6 times, and I'm back at the dashboard, this is after forced garbage collection: Specifically I'm referencing Brave, although I'll see the same activity from any Chromium based browser. Oddly enough Firefox is stable and doesn't throw the memory around, When I view the heap through the memory tab in the console, that's staying stable, it's the system memory that seems to be all over the board. If I run this same kind of test on our production version using the following network, which is 7000+ segments 45 Feature Layers, 10 of them having meaningful data : Then I cycle through ~20 maps, and land back at the dashboard, after a forced garbage collection I'm setting at: To be fair, this is much better then it was in 4.16, where that number would commonly go over 2 GiB+, but it seems something is still kicking around. I've been sitting at the Dashboard for ~10+ minutes and that number is fairly stable. Thanks
... View more
10-21-2020
12:06 PM
|
0
|
1
|
3391
|
|
POST
|
Good Day Sorry for the delay in reply, I integrated your suggestions and added a much bigger data file. This code is roughly laid out to match our production code: esri-printtask-issue/src/app at master · docmur/esri-printtask-issue · GitHub I'm still seeing the memory climb when I switch back and forth, is there anything else you can recommend? Thanks
... View more
10-20-2020
02:18 PM
|
0
|
0
|
3391
|
|
POST
|
Hey This would be a continuation, but to prevent from it getting bunched together I made this a new task. To be fair the only change on this test repo is that I changed the version to 4.17 from next. If we need to wait until December that's fine. We'll wait for a fix, I just wanted to make sure this was known, feel free to use that code I posted for testing. Thanks
... View more
10-13-2020
11:20 AM
|
0
|
1
|
3391
|
|
POST
|
Good Day I'm trying out 4.17 with the following test repo: GitHub - docmur/angular-esri-memory-test, I added in the new view.destroy and map.destroy but the memory is still not getting freed! Have I taken the correct steps to free the memory? Thanks
... View more
10-13-2020
08:49 AM
|
0
|
8
|
3516
|
|
POST
|
That's my thinking, so if I don't run into any issue tomorrow with it then we'll mark is "solved", because if it's not causing a problem then I can wait.
... View more
09-24-2020
01:34 PM
|
0
|
0
|
2568
|
|
POST
|
I tested out 4.15 and it seems to be working perfectly fine, so I'm not sure why that is but I haven't had a problem all day with it. I see a lot of errors but they're not breaking anything so that's good enough to bridge until 4.17
... View more
09-24-2020
12:32 PM
|
0
|
2
|
2568
|
|
POST
|
Good Day Wondering why I keep errors on the Home / Print Task Widget? Both give me: My test code: GitHub - docmur/esri-printtask-issue Thanks
... View more
09-24-2020
10:46 AM
|
0
|
0
|
807
|
|
POST
|
Sweet! Is there a way to get this pushed on to 4.16?
... View more
09-23-2020
03:02 PM
|
0
|
4
|
2568
|
| 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 |
03-13-2026
07:55 AM
|