|
POST
|
PWA will only get you so far. It will cache static assets, like JS, CSS, images, stuff like that. But map data not so much. Plus there is licensing of offline that plays into it as well. You could do some light disconnected style work, like for field apps. Say you have spotty connection in the field, you can start DIY edit session with a local FeatureLayer, then do a batch edit when you have a better connection. I wrote about that here. https://odoe.net/blog/edit-sessions
... View more
06-09-2021
10:56 AM
|
0
|
1
|
3900
|
|
POST
|
There's nothing in the API to do this natively. There is an FGDB API you can try some stuff with. https://github.com/Esri/file-geodatabase-api Years ago, I wrote a node extension to play with it. https://github.com/odoe/node_fgdb It might be possible compile this to web assembly and use it with the a web app, but I haven't tried that and I'm not sure if anyone else has. You would still need to write a thin API layer to expose some fgdb methods, but could be a fun project.
... View more
06-09-2021
10:19 AM
|
0
|
3
|
3902
|
|
POST
|
It doesn't look like you're adding the expand for the layerlist to the page, you're adding the LayerList itself. // current
view.ui.add(layerList, {
position: "top-right",
index: 4
});
// update
view.ui.add(layerListExpand, {
position: "top-right",
index: 4
});
... View more
06-05-2021
09:01 AM
|
0
|
1
|
1650
|
|
POST
|
Doesn't look like the human basemaps are named basemaps in the API. https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap You can find the basemap webmap ids by searching https://www.arcgis.com/home/search.html?q=human%20geography&focus=maps-webmaps
... View more
06-03-2021
08:49 AM
|
0
|
0
|
1187
|
|
POST
|
I'm not sure without real services to test, but are they non-mercator? I tried goTo with lines using Sketch Widget and it works. https://codepen.io/odoe/pen/dyvzweE?editors=1000
... View more
05-27-2021
08:31 AM
|
0
|
7
|
4240
|
|
POST
|
This is odd. Windows I assume? The command definition isn't camelcase https://github.com/Esri/arcgis-js-cli/blob/master/src/commands/styles.ts#L4 So i'm not sure why that would happen. I don't use Windows often, but will still take a look. Thanks!
... View more
05-26-2021
02:03 PM
|
0
|
1
|
2249
|
|
POST
|
This might help, it shows how to copy the schema of a FeatureLayer and copy features to the new layer that you can apply a new renderer to. https://codepen.io/odoe/pen/QWGRJNg
... View more
05-25-2021
08:27 AM
|
0
|
0
|
5001
|
|
POST
|
The content property for Expand can take any DOM element. https://codepen.io/odoe/pen/eYvWMGE?editors=0010
... View more
05-24-2021
09:41 AM
|
2
|
1
|
2024
|
|
POST
|
I should have asked this to start, but if you are using Online or Enterprise, you can use the Summarize Within analysis tool in the MapViewer Classic to do this. It will do counts and stats for you. ReneRubalcava_0-1621615200701.png But you're on the right track, pre-processing is definitely the way to go if you can. I am not strong with Python though, I can fake it when I need to.
... View more
05-21-2021
09:40 AM
|
1
|
0
|
6135
|
|
POST
|
Ok, if you are using Vue3, you're going to have some issues. Vue3, and even Vuex for Vue3, use Proxy to manage state. Today, native JavaScript Proxy has some issues with our underlying Accessor we use as core our JSAPI. To be fair, we had to implement Accessor long before Proxy was finalized and it allows us to do some amazing stuff for property watching, optimizing internal changes and more. It is on our roadmap to update this in the future and make it compatible with native Proxy, but there is no timeline for this at the moment. So for Vue3 apps, I would suggest using a simpler pojo module to hold any JSAPI related instances, and maybe expose methods for updating those, like the maps basemap. You can still manage state in Vue3, things like basemap strings, scale, zoom level, item numbers, counts, and so on, but actually updating JSAPI related stuff should be handled in a simpler module. Something like this, although that uses Vue2.
... View more
05-21-2021
08:15 AM
|
0
|
2
|
4335
|
|
POST
|
I recently did a video on this type of thing. Here is a codepen to look at https://codepen.io/odoe/pen/vYxYxXm In your case, since it's just counts, it's fairly straight forward, but could be an intensive task. const query = {
returnGeometry: true,
};
const cityResults = await cityLayerView.queryFeatures(query);
const frsResults = await frsLayerView.queryFeatures(query);
const features = [];
let temp = [...frsResults.features];
let temp2 = [];
// the loop is where you could block UI.
// You loop over polygons, then each polygon
// loops over each point to check if it's contained.
// You can mitigate this by removing found points from
// array of points with Array.splice()
for (let feat of cityResults.features) {
const graphic = feat.clone();
graphic.attributes.count = 0;
temp2 = [...temp];
for (let i = 0; i < temp2.length; i++) {
const x = temp[i];
if (
x &&
graphic.geometry &&
x.geometry &&
graphic.geometry.contains(x.geometry)
) {
graphic.attributes.count++;
temp.splice(i, 1);
}
}
features.push(graphic);
} I added a comment in there about the performance hit you can take and one way to mitigate it. If it's a lot of points, you might need to run this iteration in a worker.
... View more
05-20-2021
08:33 AM
|
2
|
2
|
6157
|
|
POST
|
I am going to guess it has to do with the babel configuration and possibly the underlying webpack config being used in vue-loader. Not too sure. Since we are full ESM, there might need to be some updates to how vue2 builds. I don't have a solid solution for this one, just guesses.
... View more
05-13-2021
09:40 AM
|
0
|
1
|
2967
|
|
POST
|
Sorry, don't know what I was thinking, missed that. You might be able to get a better detailed message with an interceptor. https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor We typically expose this on the layer in various load errors/warnings https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#loadError Not sure why it's not caught properly in a catch
... View more
05-13-2021
09:10 AM
|
1
|
1
|
2976
|
|
POST
|
I don't think there's many JS AOP libs out there, other than AspectJS, but I don't know if it's still active and maintained. You could probably use JavaScript Proxy for similar AOP type work to intercept methods. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply I haven't tried this though, so can't say for sure. However, at the moment our base Accessor used for almost all the JSAPI does not work well with Proxy, but we are looking to update the in the future.
... View more
05-12-2021
09:51 AM
|
0
|
1
|
3505
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 2 weeks ago | |
| 1 | 07-17-2026 10:17 AM | |
| 2 | a month ago | |
| 2 | 05-19-2026 02:12 PM | |
| 1 | 04-24-2026 11:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|