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
|
130
|
POST
|
Good Afternoon Thanks for the suggestion, but I don't think that works with a dynamic renderer. I found a way to get the view to zoom to the layer extent, but now when zooming in everything goes too far the other way and disappears. Thanks
... View more
07-15-2024
11:28 AM
|
0
|
0
|
228
|
POST
|
Good Day I have a large network that I want to view as a heatmap. I have the following heatmap render settings: const heatmapParams = {
layer: layer,
view: view,
field: field,
colorStops: this.colourStops,
};
heatmapRendererCreator.createRenderer(heatmapParams).then((response) => {
this.heatmapRenderSetting = response.renderer.clone();
r(this.heatmapRenderSetting)
}).catch((error) => {
console.log('Error');
console.log(error);
j(error);
}) If I'm zoomed out and view the data, the heatmap looks great, the problem, if I load the map being zoomed in with no data in the view, the heatmap is completely washed out. Is there a way to generate the heat map using the data in the map view, what's in the current view extent? Or, can I set the zoom dynamically before loading the Heatmap, so the data is in the view? Thanks
... View more
07-15-2024
10:16 AM
|
0
|
4
|
248
|
POST
|
Good Day I have a field that stores a date in the format: 171597000000 , which I got from querying one of the features. I've tried the queries; “inspectionDate = '2024/05/17'" and “inspectionDate = '171597000000'", with and without quotes, but that gives me “Error: Uncaught (in promise): [Error]: Invalid operator encountered”. How do you correctly query a date field? This was the format recommended in several old form posts.
... View more
05-17-2024
12:27 PM
|
0
|
0
|
193
|
POST
|
Switching to using a in (1,2,3,4.....) Doesn't seem to work but does bypass the previous restriction. The problem with using “in” is that the output doesn't seem to be SQL like. Assuming “a in (1... 45 000)” returns 45 000 features, applying more filters and queries on top, makes it seem each of those 45 000 features has to apply the filter again, which cause performance to drop through the floor. Cheers
... View more
04-01-2024
12:39 PM
|
0
|
0
|
209
|
POST
|
Good Day I'm running into an issue of setting a definition express when the query is massive, like 100kb in size. I have a map with ~74k line segments on it, all rendered client side, and when I try to find a large subset of that group ~7k lines, the query ends up being massive, because I can only query the data using a single key. This is how I'm applying the query, but is there a better method? Here is a sample query: query: "a >= 1610 AND a <= 1610 OR a >= 1640 AND a <= 164" ... Show Moe (120 kB) this._view?.map?.layers?.forEach((layer) => {
if (layer?.type === 'feature') {
queryBlock.blockQuery.forEach((query) => {
if (layer?.id.includes(`-${query.x}`)) {
layer.definitionExpression = query.query;
}
});
}
}) Thanks
... View more
04-01-2024
09:38 AM
|
0
|
1
|
311
|
POST
|
I found a workaround, if you ever run into this, but it requires a username / password. const param = {
username: this.username,
password: this.password
}
// @ts-ignore
esriId.generateToken(serverInfo, param).then((tokenRes: any) => {
esriId.registerToken({server: serverURL, token: tokenRes.token});
esriId.checkAppAccess(serverURL, appId).then((getCredRes) => {
r(getCredRes);
}).catch((error) => {
console.log('Error - Checking App Access');
console.log(error);
j(error);
})
r(serverURL);
}).catch((error) => {
console.log('Error - Generating Token');
console.log(error);
j(error);
}) Then you'll be able to use the connection without getting stopped :).
... View more
03-13-2024
01:46 PM
|
0
|
0
|
344
|
POST
|
Good Day I'm trying to verify my application settings without having to direct through the login system. I have a page with the following formation on it (this is an Angular Application): Server URL App ID App Secret Server Type: Online vs Enterprise Token URL What I want, is to pass the data into the Identity Manager and have it give me back a successful response, to verify the data is correct. Every time I call the Identity Manager, with this flow: const info = new OAuthInfo({
appId: portalConfig.appId,
flowType: 'auto',
popup: popup
});
IdentityManager.registerOAuthInfos([info]);
IdentityManager.getCredential(portalConfig.serverURL + '/sharing').then(() => {
IdentityManager.checkSignInStatus(portalConfig.serverURL + "/sharing").then(() => {
r(portalConfig.serverURL);
}).catch((error) => {
console.log('Error - Identity Manager - Check Sign In Status');
console.log(error);
j(error);
})
}).catch((error) => {
console.log('Error - Identity Manager - Get Credential');
console.log(error);
j(error);
}) I get redirected to a window that asks if I want to allow that connection How can I bypass this Windows? I'm using ArcGIS Code 4.29.7. Thanks
... View more
03-12-2024
11:20 AM
|
0
|
2
|
383
|
POST
|
Good Day I've had a lot of problems with the memory and Angular, so this is how we keep it in check: 1. Use a Store to keep the view / map, and use the RenderFactory to attach the view / map into and remove it from a container. 2. Make sure you're removing, freeing or deleting as many resources as possible, for instance here is some code from our ngOnDestroy() public ngOnDestroy(): void {
this.esriSvc.removeMapViewContainer(this.mapViewEl);
try {
this._Attribution?.destroy();
this._Attribution = null;
} catch (error) {
console.log(error);
}
try {
this._clickEvent?.remove();
this._clickEvent = null;
this._BasemapGalleryWatcher?.remove();
this._BasemapGalleryWatcher = null
} catch (error) {
console.log(error);
}
try {
this._sketchWidget?.destroy();
this._sketchWidget = null;
this.sketchLayer?.destroy();
this.sketchLayer = null;
} catch (error) {
console.log(error);
}
try {
this._view.map.layers.forEach((layer) => {
layer.clear()
layer.destroy()
})
this._view.map.layers = null;
} catch (error) {
console.log(error);
}
try {
this._view.ui.empty();
this._view.popup = null;
} catch (error) {
console.log(error);
}
try {
this._map.removeAll();
} catch (error) {
console.log(error);
}
try {
this._widgets.forEach((widget) => {
if (widget) {
try {
widget = null;
} catch (error) {
console.log(error);
}
}
})
this._widgets = [];
} catch (error) {
console.log(error);
}
//
// NOTE: This function resets every variable we allocate
//
this.destroyStuff();
} 3. Litsten to Andy, he's awesome and has helped me in the past. Using the method I described, I've been able to cycle between 10k maps with essentially 0 memory increase. You can also look into using a global render setting, if that's applicable, and try to never destroy the map or remove and add it if you don't have to. I've found in a lot of cases it's better to just hide it, then detach and add it back. Although I know that can't always be avoided.
... View more
12-05-2023
01:49 PM
|
0
|
0
|
816
|
POST
|
Good Day I've reported this several times in the past, so this isn't new, but when is the bug that prevents the maps from being fully deleted going to be rectified? According to the documentation when you call .destroy on the map or view, all the resources should get cleaned up, but as confirmed many times they don't. There's also a second part to this where if you delete the node that houses that map, the resources still aren't cleaned up. To be clear, I'm talking about this list of resources: I know the “accepted” workaround is to use a store, so you can reuse the same map context, but it would be better if the base functionality was corrected, and you could fully remove the map and all held resources. Is this something that's planning to be fixed in 4.28? As of 4.27.6 this issue is still active, and while you can heavily mitigate the amount of resources left behind, it would be better if a full destruction was possible. Thanks
... View more
10-06-2023
08:10 AM
|
0
|
0
|
379
|
POST
|
Got it! Use a pointer-down, and pointer-up event, with a set flag: this._view.on("pointer-down", (event) => {
this._view.hitTest(event).then((response) => {
if (response.results.length && this._sketchWidget.activeTool === 'lasso-selection') {
this.lassoSet = true;
}
});
});
this._view.on("pointer-up", (event) => {
this._view.hitTest(event).then((response) => {
if (response.results.length && this.lassoSet) {
this.lassoSet = false;
console.log('Response from Lasso Selection');
console.log(response);
}
});
}); Now I have a list of selected assets, so I can query them 🙂 - Hope this helps someone! Thanks
... View more
08-25-2023
10:47 AM
|
1
|
0
|
710
|
POST
|
Good Day I have a user who wants to do a reasonably complex selection using the Sketch Widget. Currently, I'm exposing the Draw Polygon, Rectangle and Circle functions, which react to the "create" event: this._sketchWidget.on("create", async (event) => {}) Which is fine, that works and I can select the map segment using those thee tools. The point selector responds to my "click" handler, which is also working properly, but what does the Lasso Tool throw for an event? It's not a click event, it's not the Sketch View create or update event, and according to the documentation, none of the other events would make any sense: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#events-summary Just so we're clear, this is the tool I'm talking about: Are there any examples to show this feature working? Thanks
... View more
08-25-2023
09:54 AM
|
0
|
4
|
759
|
POST
|
Ya, experimentation lead me to the community forum! This is a pickle, I don't think there's a good way around this, since everything is generated client side. Luckily, there's another way to access these features and select them, but you can't do it on the map.
... View more
08-11-2023
12:22 PM
|
0
|
0
|
514
|
POST
|
Good Day I know that you shouldn't query for things outside the DE, but assuming I want to select everything from the DE using the Sketch Widget selection tools, can I select things that aren't visible due to their size? This can happen if the feature becomes too small to render. Thanks
... View more
08-11-2023
07:03 AM
|
0
|
2
|
523
|
POST
|
Good day If I have a view with 200 features in it, but only 150 features are shown because 50 of them are too small, after setting a definition expression, is there a method to select them all, even the non-visible ones, using the Sketch Widget "Draw a Rectangle" tool? My current logic is: Processng the "Draw" this._sketchWidget.on("create", async (event) => {
if (event.state === "complete") {
this._view.graphics.removeAll();
const geometries = this.sketchLayer.graphics.map((graphic) => {
return graphic.geometry
});
const queryGeometry = await geometryEngineAsync.union(geometries.toArray());
this.selectFeatures(queryGeometry);
}
}); Running the query: private selectFeatures(geometry): void {
const query = {
geometry: geometry,
outFields: ["*"],
returnGeometry: true,
};
this._view.graphics.removeAll();
this.sketchLayer.graphics.removeAll();
this._view.map.layers.forEach((layer) => {
if (layer.type === 'feature') {
this._view.whenLayerView(layer).then((layerView) => {
layerView.queryFeatures(query).then((results: IQueryFeaturesResponse) => {
this.blah = [];
results.features.forEach((result) => {
this.blah.push(result.attributes.objectId);
const graphic = new Graphic(<GraphicProperties>result.geometry);
this._view.graphics.add(graphic);
})
}).catch((queryError) => {
console.log('Query Error');
console.log(queryError);
})
})
}
})
} Is there a query parameter I can use to make sure everything, no matter its size, is selected? Thanks
... View more
08-10-2023
10:27 AM
|
0
|
4
|
601
|
Title | Kudos | Posted |
---|---|---|
1 | 10-07-2022 08:14 AM | |
1 | 08-25-2023 10:47 AM | |
1 | 02-23-2023 08:22 AM | |
1 | 11-03-2022 02:44 PM | |
1 | 11-19-2021 02:12 PM |
Online Status |
Offline
|
Date Last Visited |
07-22-2024
07:24 PM
|