POST
|
Is there a way to have the rectangle and lasso selection tools show up in 3D? They show up in 2D and work fine, but they are hidden in 3D. I created a couple of codepens to illustrate the issue. The code is exactly the same except the 3D codepen uses SceneView instead of MapView. https://codepen.io/cschwind/pen/KKGvwrm - 2D works as expected https://codepen.io/cschwind/pen/VwEzYxg - 3D selection tools not visible
... View more
04-28-2023
01:02 PM
|
0
|
2
|
283
|
POST
|
I'm having issues with highlighting features on a FeatureLayer that is clustered. The problem that I am seeing is the highlighting only works if the feature is on the top of the cluster. Below is a link to a codepen that demonstrates the issue. When you mouse over items in the list view, on the right, you should see the associated feature on the map be highlighted. With the "Enable Clustering" checkbox on only the graphics on the top of the cluster are highlighted, so if the clustering results in two clusters on the map then the highlighting will only work for two items in the list. With the "Enable Clustering" checkbox off then the highlighting works for all items in the list. Is there some workaround for this? I was originally thinking of querying the feature layer to get the cluster graphics and highlight the cluster graphic if it is associated with the feature the user is hovering over. Unfortunately, the `featureLayer.queryFeatures()` and `featureLayerView.queryFeatures()` functions do not return the cluster graphics. Is there some other way that I can just get the clustered graphics? https://codepen.io/cschwind/pen/gOvXvZJ?editors=1000
... View more
05-31-2022
02:21 PM
|
0
|
0
|
250
|
POST
|
I wrote some JavaScript code to save a client side feature layer to a feature service on ArcGIS Online. I'm running into an issue where if I navigate to the layer from ArcGIS Online, it overwrites my minScale and maxScale values. This causes my graphics to not always show up when the map viewer loads or the graphics disappear if the user zooms in (most graphics are on a building level of scale). I want the minScale and maxScale values set to 0, so the graphics are always visible and the user doesn't have to change the visibility range. I'm using the addToDefinition REST service (Add to Definition (Feature Service)—ArcGIS REST API: Services Directory | ArcGIS for Developers) for saving the layer to the feature service. When I make this call I'm setting the maxScale and minScale to 0. I've included the JSON that I'm passing in to the addToDefinition call below. If I navigate to the layer via a url formatted like https://services5.arcgis.com/<owner id>/arcgis/rest/services/<feature server name>/FeatureServer/<layer id>?token=<token>, I can see that minScale and maxScale are 0 as expected. If I navigate to the layer through ArcGIS Online, the minScale and maxScale get overwritten. The screenshot below shows that an updateDefinition call is being made on my layer, which sets the maxScale to 564 and the minScale to 4514. I have noticed that I can make a updateDefinition (Update Definition (Feature Layer)—ArcGIS REST API: Services Directory | ArcGIS for Developers ) call to the layer and reset minScale and maxScale back to 0. I have noticed that if I visit ArcGIS Online and then make the call to updateDefinition, my minScale and maxScale values will stay 0. So it seems like I'm missing some setting on the layer, that triggers ArcGIS online to update minScale and maxScale. Is there a setting that I can set in the addToDefinition call (or elsewhere) that will prevent ArcGIS Online from overwriting my minScale and maxScale settings? addToDefinition: { "layers": [{ "type": "Feature Layer", "editFieldsInfo": { "creationDateField": "CreationDate", "creatorField": "Creator", "editDateField": "EditDate", "editorField": "Editor" }, "editingInfo": { "lastEditDate": 1455126059440 }, "geometryType": "esriGeometryPolygon", "maxScale": 0, "allowGeometryUpdates": true, "hasAttachments": false, "htmlPopupType": "esriServerHTMLPopupTypeNone", "hasM": false, "hasZ": false, "objectIdField": "OBJECTID", "globalIdField": "GlobalID", "fields": [{ "name": "OBJECTID", "type": "esriFieldTypeOID", "actualType": "int", "alias": "OBJECTID", "sqlType": "sqlTypeInteger", "length": 4, "nullable": false, "editable": false, "domain": null, "defaultValue": null }, { "name": "PERMANENT_IDENTIFIER", "type": "esriFieldTypeGUID", "alias": "PERMANENT_IDENTIFIER", "sqlType": "sqlTypeOther", "length": 38, "nullable": false, "editable": true, "domain": null, "defaultValue": "NEWID() WITH VALUES" }, { "name": "GlobalID", "type": "esriFieldTypeGlobalID", "alias": "GlobalID", "sqlType": "sqlTypeOther", "length": 38, "nullable": false, "editable": false, "domain": null, "defaultValue": "NEWID() WITH VALUES" } ], "supportedQueryFormats": "JSON", "hasStaticData": false, "maxRecordCount": 1000, "standardMaxRecordCount": 4000, "tileMaxRecordCount": 4000, "maxRecordCountFactor": 1, "capabilities": "Create,Delete,Query,Update,Editing,Extract,Sync", "exceedsLimitFactor": 1, "name": "Scenario18_Testing", "description": "jklj", "extent": { "spatialReference": { "latestWkid": 3857, "wkid": 102100 }, "xmin": -8815056.763641614, "ymin": 4604215.222325314, "xmax": -8815041.647920694, "ymax": 4604232.558750913 }, "minScale": 0 } ] }
... View more
04-07-2020
12:42 PM
|
0
|
0
|
573
|
POST
|
I was able to get the KML file import working, using this method. Some of my KMLs are more complex, but I think I can use the results from https://utility.arcgis.com/sharing/kml to get what I need that is missing from the kml to geoJSON conversion. Thank you!
... View more
01-09-2020
07:47 AM
|
1
|
0
|
2890
|
POST
|
Unfortunately, I don't have a back-end that I can add to.
... View more
01-08-2020
04:55 AM
|
0
|
0
|
2890
|
POST
|
I can directly call the https://utility.arcgis.com/sharing/kml web service with the contents of the file that I loaded in, but I don't see any way to make a KMLLayer from the response. When I do this I get the following response: The last post in Is it possible to load KML from a file? shows how to create the KMLLayer from the above response in the 3.X api, but the KMLLayer in 4.X doesn't have the parameters necessary to use this method.
... View more
01-07-2020
06:41 AM
|
0
|
2
|
2890
|
POST
|
I just tried using URL.createObjectURL, but the https://utility.arcgis.com/sharing/kml?url=<generatedUrl> web service ,that is called when the KMLLayer is initialized, immediately returns an "Invalid URL" error. The url that is generated looks like "blob:http://mysite.com/56f7c728-05d6-4fb1-8a4e-0e76714ca57c". If I remove the "blob:" part of the url, then the https://utility.arcgis.com/sharing/kml service will spin for a while and eventually return a "File not found. Wrong url or out of memory" error. It looks like the web service that supports the KMLLayer rejects any url with something before "http".
... View more
01-07-2020
06:25 AM
|
0
|
3
|
2890
|
POST
|
Hi Egge-Jan Pollé, The sample shows how to load a KMLLayer using a url. Is there a way to display a KMLLayer from local files on the user's machine in 4.x? In my app, I've added the ability for a user to select local files and have them displayed on the map.
... View more
01-06-2020
06:47 AM
|
1
|
5
|
2890
|
POST
|
Is there a way to display data from a KML file in a KMLLayer. I found some code at the bottom of this post Is it possible to load KML from a file?, that works for displaying KML files in the 3.x api. Is there something similar that can be done in the 4.x api?
... View more
01-06-2020
06:25 AM
|
0
|
10
|
3531
|
POST
|
Hi, Sorry I'm resurrecting this question. We recently upgraded to 4.13 and found that our Graphics layer highlighting is no longer working again, even if I add an objectID attribute. If I downgrade back to 4.12 the highlighting works without changing any code. Is there something I need to do differently, in 4.13, to get the graphics layer highlighting to work?
... View more
11-07-2019
06:36 AM
|
0
|
1
|
3315
|
POST
|
I updated my codepen (https://codepen.io/cschwind/pen/LYYQrmE ) to check the layers prior to zooming and I'm still seeing the same issue.
... View more
11-05-2019
08:19 AM
|
0
|
1
|
907
|
POST
|
Hi Noah, The console.log statements do follow the same pattern. I will get a true saying the layers are loading, but I never get the false saying the layers finished loading. I modified your codepen to use feature layers, 4.13 API and added logic for zooming into the extent of the features. It looks like my zoom logic is what is causing the infinite loading spinner issue. This issue is intermittent, so you may need to refresh the page a few times. Is there a better way of zooming to the extent of all of the features that doesn't have this issue? https://codepen.io/cschwind/pen/LYYQrmE
... View more
11-04-2019
12:32 PM
|
0
|
1
|
907
|
POST
|
I'm trying to display a loading spinner over my map by watching the updating status on the view. Sometimes this value is stuck on true, so the loading spinner never goes away. I've also noticed that when this happens the loading bar in the layer list widget never goes away either. The network tab in Chrome doesn't show any pending requests. I am using version 4.13 of the JavaScript API and the feature layers are on version 10.51. Below is some pseudo code. I've looked at the updating status of each layer view in the group layer and it is random as to which one gets stuck on true (sometimes it's more than one that gets stuck on true). const pointsLayer = new FeatureLayer({ url: waterbodyService.points, definitionExpression: filter, outFields: ['*'], renderer: pointsRenderer, popupTemplate, }); const linesLayer = new FeatureLayer({ url: waterbodyService.lines, definitionExpression: filter, outFields: ['*'], renderer: linesRenderer, popupTemplate, }); const areasLayer = new FeatureLayer({ url: waterbodyService.areas, definitionExpression: filter, outFields: ['*'], renderer: areasRenderer, popupTemplate, }); const waterbodyLayer = new GroupLayer({ id: 'waterbodyLayer', title: 'Waterbodies', listMode: 'hide', visible: false, }); waterbodyLayer.addMany([areasLayer, linesLayer, pointsLayer]); var map = new Map({ basemap: "gray" layers: [waterbodyLayer], }); var mapView = new MapView({ container: "viewDiv", map: map, center: [-117.98118, 34.00679], zoom: 10 }); watchUtils.whenTrue(mapView , 'updating', (updating) => { console.log('whenTrue: ', updating); if (!mapView .interacting) setMapLoading(true); // turn off loading spinner }); watchUtils.whenFalse(mapView , 'updating', (updating) => { console.log('whenFalse: ', updating); setMapLoading(false); // turn off loading spinner });
... View more
10-31-2019
12:41 PM
|
0
|
5
|
1073
|
POST
|
I was able to use version 4.12 and that fixed the issue! Thank you!
... View more
08-15-2019
09:59 AM
|
0
|
0
|
3315
|
Title | Kudos | Posted |
---|---|---|
1 | 01-06-2020 06:47 AM | |
1 | 01-09-2020 07:47 AM |
Online Status |
Offline
|
Date Last Visited |
02-02-2024
07:45 PM
|