POST
|
Indeed there might be no magic and this would result in 100+ requests internally too. We have a lot of users so this could get heavy fast. We discussed it a bit more and we are now thinking of caching the values somewhere. Most of our data is static, so we believe it would be acceptable to display a feature count that might be several days old. We could have a simple bash script fetch the feature counts from the Map services at regular intervals, and save this in a table. Then our GIS application would simply fetch the feature counts from that table directly. This is probably what we'll do if there's no better way. Thanks.
... View more
08-11-2023
10:17 AM
|
1
|
0
|
628
|
POST
|
For our GIS application I need to get the feature count of each layer in a map service and display them. Right now I can do this by querying each layer individually using the returnCountOnly parameter. However when we have map services with 100+ layers, this generates a lot of HTTP requests on the map service. I can manage this by adding a delay between each request, but I fear this many requests might also skew our usage statistics of these map services. If there is a way to get the feature count of all layers in a single HTTP request, I would like to know. If this isn't possible directly using the ArcGIS REST API, then I'm also open to other suggestions (e.g. publish a geoprocess on ArcGIS Server ?) Thanks
... View more
08-11-2023
09:21 AM
|
0
|
2
|
685
|
POST
|
Actually Joel, you were right. It does appear that esriRequest.setRequestPreCallback is called for each and every export request automatically. That's very nice, and will simplify a lot of things for me. Thanks!
... View more
12-16-2022
07:29 AM
|
0
|
0
|
219
|
POST
|
I guess that could work if I did the request manually myself whenever the map was panned or zoomed, but I'd prefer letting the API do the export request itself. I did some experimenting and found that I could hack in some extra parameters by adding them to the private _params property of the layer. Ex: const layer = new ArcGISDynamicMapServiceLayer(url, options) layer._params.clipping = JSON.stringify({ geometryType: 'esriGeometryPolygon', geometry: { rings: [[[382057.1446,5390601.6059],[382057.2633,5390601.4493],[382057.3779,5390601.2897],[382057.4883,5390601.1272],[382057.5946,5390600.9619],[382057.6965,5390600.7939],[382057.7941,5390600.6234],[382057.8872,5390600.4504],[382057.9758,5390600.275],[382058.0599,5390600.0974],[382058.1394,5390599.9177],[382058.2142,5390599.736],[382058.2844,5390599.5525],[382058.3497,5390599.3672],[382058.4103,5390599.1803],[382058.466,5390598.9919],[382058.5169,5390598.8021],[382058.5628,5390598.611],[382058.6038,5390598.4189],[382058.6398,5390598.2257],[382058.6708,5390598.0317],[382058.6969,5390597.8369],[382058.7178,5390597.6416],[382058.7338,5390597.4457],[382058.7447,5390597.2495],[382058.7505,5390597.0531],[382058.7513,5390596.8566]]], spatialReference: { wkid: 32188, latestWkid: 32188 } } }) It works, the image is clipped properly. Thanks
... View more
12-16-2022
06:19 AM
|
0
|
0
|
221
|
POST
|
Starting at ArcGIS Server 10.8, for map services using the ArcGIS Pro runtime, the export request now supports the clipping parameter to clip the image produced, according to the geometry included in the clipping parameter. This works fine when I test it manually (e.g. Either through the ArcGIS REST Services Directory for the export request, or by using Postman). The image is clipped. However I need to do this clipping within a web application using the ArcGIS API for Javascript 3. For instance for the ArcGISDynamicMapServiceLayer I see no obvious way to input this clipping parameter. Neither directly or through some other configuration. Is this possible? If this is not currently supported in the ArcGIS API for Javascript 3, is there a way to hack in some extra parameters when the API makes export requests? So that I could manually set this clipping myself?
... View more
12-15-2022
11:19 AM
|
0
|
3
|
276
|
POST
|
Recently we've switched to using our own custom build to improve initial load time performance of our web app. The web app is used on both desktop and mobile. We are building using ArcGIS API 3.30. Everything works fine except for the zooming (.i.e pinch) and panning on mobile. There are no errors that would show I'm missing a module dependency (the phone is connected with USB to a desktop and I'm checking the console of the remote device in Chrome). The zooming and panning works fine if I test using the ArcGIS API CDN instead. Assuming that the build works properly, then all module dependencies that would normally be fetched from the CDN are already included in the custom bundle. Otherwise I would need to manually include them in the custom build profile. Like the specific module of Dojo or the ArcGIS API that handles zooming and panning on mobile. However I'm not sure what exact module handles that.. The only other thing I can see is that the code that handles this is somehow already included in the init.js bundle of the ArcGIS API on the CDN. I which case I don't really know how I could fix this in our custom build. Anyone faced this problem before, or has any idea how I could fix this? Thanks Edit: I want to add that the issue seems to happen only on Chrome Android 78.0. Firefox on Android works fine. So I'm wondering if this is linked to this issue. We pulled the latest sources for 3.X from this repo GitHub - Esri/jsapi-resources: A collection of useful resources for developers using the ArcGIS API for JavaScript. just yesterday, then recreated our custom build from it and it still happens. Is it possible that this repo does not contain the bug fix yet?
... View more
11-12-2019
12:58 PM
|
0
|
0
|
436
|
POST
|
Yeah I did it too a few weeks ago, in ArcGIS 3.29, using custom tiles generated using ST_asMVT in postgis. The only thing I couldn't do is display labels from attributes included in the tiles. I could be wrong, but I suspect the ArcGIS API fetches the required JavaScript code to render labels from the ArcGIS Enterprise server, using web workers. Which would explain why they say ArcGIS Enterprise is mandatory to use VectorTileLayer. I was able to replicate the json files for the service metadata and style, but not this.
... View more
10-31-2019
07:50 AM
|
0
|
0
|
5280
|
POST
|
Ok thanks for the confirmation. I see now that the 4.X VectorTileLayer can take more parameters then the 3.X VectorTileLayer so I'm not sure either, but at least knowing that the layer can display that format in the end is encouraging and means it's worth investing some time into building our own vector tile API between the ArcGIS API 3.X and PostGIS. Edit: So I made my own tile server (a tiny Node.js/Express API) and I just wanted to confirm that indeed the tiles generated by ST_asMVT (PostGIS 2.4+) can be displayed using the VectorTileLayer in the ArcGIS API 3.X
... View more
10-02-2019
05:51 AM
|
0
|
0
|
2676
|
POST
|
Just to be clear are you saying that you're able to display .mvt format tiles in your VectorTileLayer? More specfically, I need to know if the vector tiles generated on the fly by the ST_asMVT function in postgis 2.5 can be displayed in the ArcGIS API map (one way or another). Anyone know? If so, does that only work with the ArcGIS API 4.X or we could use 3.X instead?
... View more
10-01-2019
01:16 PM
|
0
|
2
|
2676
|
POST
|
I'd like to know this as well, but for the ArcGIS API 3.x Is the VectorTileLayer only accepting OSM pbf format?
... View more
09-12-2019
02:18 PM
|
0
|
0
|
5280
|
POST
|
Well, it's worse then just a guarantee of order, because even if I tried to handle the order myself with graphic.getDojoShape() move functions, it won't work since the polygon graphics are in their own subgroup v.s. the other types. Also I tried to cheat and move the SVG polygon graphics manually out of this subgroup, but the API just puts them back in at the next GraphicsLayer refresh. The fact that the API forces this polygon subgroup makes it impossible for me to handle the ordering myself using a single GraphicsLayer. So yeah, as you suggest I guess the only alternative is using one graphic per GraphicsLayer, the Leaflet way. Although I don't think it will be possible to do such a refactoring in our webapp at this point. For now the users just won't be able to control the ordering for individual polygons v.s. other types. Thanks David
... View more
11-20-2017
05:21 AM
|
0
|
0
|
523
|
POST
|
Thanks Robert. I mainly wanted confirmation of the bug, so I'm grateful for that. I'll stop looking for a mistake in our own code. I tried the workaround suggested in the other post but it just didn't work for me. I tried a bunch of variations too, included redraw call for the GraphicLayer, added setTimeout before removing the temp graphic, etc.. but it still happens. For now I'll just document the bug in our code as a known issue. It's too minor to waste additional time on it. Thanks
... View more
11-07-2017
07:56 AM
|
1
|
0
|
468
|
POST
|
ArcGIS JavaScript API 3.22 Recently we added the possibility for the user to set the Halo color of the TextSymbol for new Graphics added to the map. The user sets the color first and then the app will setHaloColor of the symbol before the Graphic is added to the map. It works fine, except I noticed that the first time a text Graphic in the map is put in edit mode using this.editToolbar.activate(Edit.MOVE | Edit.SCALE | Edit.ROTATE, graphic, {}); then the halo color of that Graphic will revert to white. If I inspect the SVG element using the chrome dev tools, I will literally see the filter attribute color change back to 255_255_255_1 when I edit the Graphic. It happens only the first time, one time. It's fine after that for any other Graphic. Until the web app is reloaded. It happens will all browsers. Almost seems like a bug where somewhere in the API some variable is not set at first, and it breaks the halo color only the first time editToolbar.activate is used. Can anyone confirm this issue? Thanks
... View more
11-06-2017
01:33 PM
|
0
|
2
|
572
|
POST
|
ArcGIS API for Javascript 3.22 When adding graphics to a GraphicsLayer, I noticed that all my Graphics using a SimpleFillSymbol (i.e. polygon geometry) are bunched together in a single SVG <g> element. My other graphics using SimpleLineSymbol (i.e. polyline geometry) or TextSymbol are added separately in their own <path> and <text> elements, respectively. I'm not sure if the API does intentionally or not, maybe for some sort of performance reason. If so, I'm wondering if this can be avoided because it really messes with my graphics ordering. In our webapp users should be able to edit and manipulate graphics ordering, but this <path> grouping into a single <g> seems to make it impossible, since all graphics using SimpleFillSymbol will have their own order v.s. all other Graphics. See below screenshot for example, where I drew 3 shapes along with a bunch of text measures for those shapes. You can see that all the TextSymbol are drawn above all the shapes, regardless of the order I added them to the layer. Any way to add them as simple <path> elements like the Graphics using SimpleLineSymbol? Thanks, Yohan
... View more
10-31-2017
06:26 AM
|
0
|
2
|
633
|
POST
|
This still seems to be an issue with 3.21? I'm trying to do a simple union of two polygons and I get a TypeError at the exact same line as shown above by Joel Bennett. I don't have any try-catch and the spatialReference (32188) is the same for both polygons. I tried geometryEngine.simplify on each of those polygons before doing a union on them, but it didn't help. The union of the GeometryService works fine. What am I doing wrong with geometryEngine.union? Update: I tried to figure out how I could apply a fix to that problem function at runtime, but it's not accessible from outside geometryEngine. So I ended up doing something similar to Joel Bennet. I recreated my own version of the geometryEngine (I called it app.geometryEngine), replaced the define at the top from esri/geometry/geometryEngine to app/geometryEngine and also added the "if (n)" at the same problem line. Everything seems fine now. Will update if that changes in the future.
... View more
09-13-2017
12:23 PM
|
0
|
0
|
1141
|
Title | Kudos | Posted |
---|---|---|
1 | 08-11-2023 10:17 AM | |
1 | 12-10-2013 05:28 AM | |
1 | 11-07-2017 07:56 AM | |
2 | 05-04-2015 10:19 AM | |
2 | 05-04-2015 09:21 AM |
Online Status |
Offline
|
Date Last Visited |
08-11-2023
08:53 PM
|