POST
|
Here's a tip for troubleshooting which layer might be causing your problem with the login window: https://community.esri.com/people/jbarry-esristaff/blog/2020/04/08/tip-load-layers-using-portal-item-id-versus-rest-endpoint-uri
... View more
04-08-2020
01:27 PM
|
0
|
0
|
828
|
BLOG
|
When using the ArcGIS API for JavaScript (v4), and creating ~Layer objects, there are two ways to connect to the resource, either by loading the portal item by its portal ID, or by calling the REST endpoint URI directly: var fl = new FeatureLayer({
portalItem: {
id: 'a624a764295e4887b096ab7972b7bd8f'
}
});
// OR...
var fl = new FeatureLayer({
url: "https://services6.arcgis.com/0p6i4J6xhQas4Unf/arcgis/rest/services/SI_TRACKS/FeatureServer"
}); In either case, any rendering, popups, or other settings and configuration that you've saved back with the layer will come through. If a layer or other resource in the app/page has some sharing perms set on it, making it only accessible by the Owner, or an Organization or Group within, it's by design that the API will open up a modal login dialog to see if the user is allowed to access that resource. One advantage to loading the layer using its portal ID is when it comes to figuring out which layers are opening a modal dialog when you're not expecting them to. If your map contains many layers, this can be a bit of troubleshooting. If you created the layer using the url property, the modal login dialog will look like this: Not very useful. But, if you created the layer using the portalItem property, the modal login dialog will look like this: Very useful. The dialog tells you right there exactly which Portal Item it is trying to open. You can go back into your code or your Content tab and find the layer that may not have its sharing permissions set as you expected. Or perhaps it's an item owned by some other person or organization. Or maybe the content used to exist, and doesn't any longer, and maybe then you can find the source data and rehost it yourself, then change the path/ID. Or just drop that item altogether if maybe it's no longer needed for your map or app. There may be other pros and cons for creating layers with url or portalItem, but this here is a case where loading by portalItem gives you useful info for troubleshooting.
... View more
04-08-2020
01:25 PM
|
2
|
0
|
1362
|
POST
|
It's on our plan for 2020. Might not be the next release, but something being worked on.
... View more
03-11-2020
02:51 PM
|
3
|
0
|
1113
|
POST
|
Sorry for the delay on this. Checking with the dev team to see what they say.
... View more
03-11-2020
01:09 PM
|
0
|
0
|
1113
|
POST
|
This can be done with v1.7.1 now. The Group class has a categories property, that gives you access to the CategorySchemaManager for that group. Then you can use the .assign_to_items() method to assign group categories to items that belong to the group.
... View more
02-18-2020
04:41 PM
|
1
|
1
|
2731
|
POST
|
Hi Xander!! Oh, that's neat. Thanks for the script. Nice use of modulus, and creative example of doing the same without it. Here's a slide deck I used, giving an Intro to Arcade 30-min session at the Mid-Atlantic User Conference a few weeks ago: Arcade: an Introduction - Esri MUC 2019
... View more
01-02-2020
02:28 PM
|
2
|
1
|
3215
|
POST
|
User error. Arcade doesn't need a Mod() function. It already has a "%" Modulus operator.
... View more
12-23-2019
02:06 PM
|
2
|
3
|
3215
|
POST
|
Seems Arcade doesn't yet have a math function, like, say: Mod(value, modulo) -> Number Anyone have a creative function for calculating one using the existing math functions? Thanks!
... View more
12-23-2019
01:03 PM
|
0
|
4
|
3436
|
POST
|
Here goes. Inside the .zip are 3 PDFs. Dropbox - GT_formula_maps.zip - Simplify your life
... View more
12-06-2019
11:04 AM
|
0
|
1
|
1141
|
POST
|
Matt: Sorry for the delay. I just noticed this message today. I don't have it in my ArcScripts database, but Rob Burke from Esri is the one who uploaded that back in 2007. I just sent him an email asking if maybe he still has it. - Jim
... View more
12-05-2019
03:59 PM
|
0
|
2
|
1141
|
POST
|
Perfect!! Thanks Robert!! No I hadn't figured it out yet. I had never really learned how things work at 3x, so I get stumped from time to time. Seems the key I was missing was: var webMapLayers = arcgisUtils.getLayerList(response); ...within the .createMap() block. Because from your code, it seems that once you have the layer out of that layer list, then .setDefinitionExpression() works the same. Oh, and yeah, the part about building the expression with "IN" rather than chaining "OR"s, just better. My head wasn't on that part of the problem, so thanks for that too. Also the array.join() method, very handy. Haven't spoken in quite a while. I hope things are going well. 🙂
... View more
11-05-2019
11:13 AM
|
0
|
0
|
2018
|
POST
|
Attn: JS API 3.x Anyone have a sample for setting a definition expression on a feature layer in a web map? I'd like to give my end-user a multiselect pick list of unique values in a column and have the layer within the web map filter its features based on that where clause. Here is an example of how it works when you load the FeatureLayer through code directly: https://codepen.io/JimBarry/pen/eYYyBya But not when the layer is inside a web map. Thanks!
... View more
11-04-2019
11:50 AM
|
0
|
2
|
2118
|
POST
|
Found it. Here's a link to it: Dropbox - AS11088.zip
... View more
04-15-2019
12:31 PM
|
0
|
1
|
856
|
POST
|
Apologies for the delay. Unfortunately those two VBScripts no longer exist. They were both created by Andrey Galyamov, who doesn't appear to be a GeoNet user. Looking at Andrey's areas of study and tools he uses, it's quite possible this is the same person: Andrey Galyamov | PhD | Russian Academy of Sciences, Moscow | RAS | Institute of Geology of Ore Deposits, Petrography, M… Interestingly enough, for the first script, Andrey mentioned a note of thanks to Stephen Lead and Kirk Kuykendall (or Kirk Kuykendall). It's possible either of those two gents might know more.
... View more
04-04-2019
11:10 AM
|
1
|
0
|
846
|
POST
|
I'm sorry about the broken link. Not sure how that happened. Regardless, here is the new link to the same document: Dropbox - ArcScripts_Items.xlsx -- https://www.dropbox.com/s/njj6xqectp2hvo3/ArcScripts_Items.xlsx?dl=0 I also went up to the 2017 post you mentioned and edited the post to show that the old link is broken, and I added the new link.
... View more
04-04-2019
11:00 AM
|
1
|
0
|
843
|
Title | Kudos | Posted |
---|---|---|
5 | 01-17-2024 01:00 AM | |
4 | 07-31-2023 06:01 PM | |
1 | 01-03-2023 01:20 PM | |
4 | 01-03-2023 10:40 AM | |
1 | 02-18-2020 04:41 PM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|