|
POST
|
TL;DR: Layout elements that are center-anchored unexpectedly shift when modified in Pro 2.5. I've noticed that layout element alignment seems to have regressed in Pro 2.5. I have a layout that I reuse for projects, which contains several center-aligned elements (specifically text and scale bar) that are slightly modified for each project. This worked fine until Pro 2.5, when it started messing up the alignment. All text is center aligned and the text box is center-anchored. As I'm updating the text, altering its width, the text continues to stay anchored as it should. But as soon as I'm done editing, the text box suddenly shifts - I believe it usually (but not always?) jumps to a spot as though it is left-anchored. This also happens with scale bars and perhaps any other element type, as well. Has anyone else experienced this? Is this a bug that Esri is aware of already? Before editing: During editing: After editing:
... View more
03-31-2020
06:21 AM
|
0
|
0
|
477
|
|
IDEA
|
I cannot vote this up enough. I hate every open/export/save interface in Pro; I cannot understand why it doesn't default to the project's home folder, nor have a home button like ArcMap.
... View more
02-20-2020
11:19 AM
|
1
|
0
|
5970
|
|
IDEA
|
When updating the URLs of services in a web map, it doesn't indicate which of those sources are direct AGS services and which are wrapped in an AGO layer item. If it's the latter, changing the layer's URL in AGO Assistant has no effect. You must check the web map's AGO item description page to see which layers are actually pointing at AGO layer items, then update the source of the layer item to point at the new REST URL. I understand it's probably a bad idea for AGO Assistant to update the source of AGO layer items without making it clear what's happening. Which is exactly why it should indicate if a particular web map layer's source is an AGO layer item and either a) make it uneditable, or b) change the source of the AGO layer item and explicitly warn that the change will affect any other web maps using the AGO layer item. Of course, I'd prefer option B, but option A would also be better than the current situation. Separate but closely related issue: If a web map layer is using an AGO layer item, it's currently not possible to change its source to a different AGO layer item or to a direct AGS service. You have to create a new layer in the web map itself, and delete the old layer.
... View more
02-18-2020
07:21 AM
|
2
|
0
|
515
|
|
IDEA
|
It does allow you to edit any content if you're an admin, but you have to search for something. It doesn't just list everything like it does for your own content. I see your comment is from a year ago; perhaps this functionality has been added since then. On the dropdown menu to the right of the search box, select your org, then type something in. It will give you all results regardless of owner. It's not a total solution if you want to browse all your org's content, but it's better than nothing.
... View more
02-18-2020
06:44 AM
|
0
|
0
|
1108
|
|
POST
|
I want to like Arcade, and its use is mandatory for many newer functions of Pro and AGOL, but... it's a young language. There will be bumps. Thank you again for your help, Xander Bakker!
... View more
01-08-2020
01:30 PM
|
1
|
0
|
8357
|
|
POST
|
Xander Bakker, You're the #1 answerer of my questions on GeoNet. Thank you! You went ahead and created a for loop like I theorized, but would have taken me a long time to figure out! Indeed, it does work. I'm left shaking my head once again at the verbosity of Arcade vs. Python. But, you did concede that it's probably not the best or fastest way. Though I really appreciate the speed of your reply!
... View more
12-20-2019
01:14 PM
|
1
|
3
|
8357
|
|
POST
|
I'm trying to calculate a field by concatenating several other fields. I need to remove extra spaces from the concatenated string. There's a straightforward way to do this in Python: " ".join(concatVar.split()) I'm trying to do the equivalent thing using Arcade, since attribute rules require it. I've played around with Arcade's split and concatenate and even replace, the latter of which can get the job done but isn't ideal. This seems like the most literal equivalent of the Python function: concatenate(split(concatVar," ")," ") The split and repeated concatenation is pointless; it still doesn't get rid of the extra spaces. The fundamental problem seems to be that Arcade's split function requires a separator to be specified rather than treating whitespace of any amount as a separator by default like Python. I've also thought about creating a for loop to trim each variable and/or use IsEmpty to find and remove nulls before they're even added to the concatenated string, but I thought there must be a simpler way. Thanks for any help.
... View more
12-20-2019
12:17 PM
|
0
|
8
|
8756
|
|
IDEA
|
I'd love to hear some feedback from Esri. This shouldn't even need to be an "idea" - it's important functionality from ArcMap missing from Pro! Editing nonversioned data is explicitly not possible unless you change a setting.
... View more
12-19-2019
09:45 AM
|
4
|
0
|
7823
|
|
POST
|
Ah! I figured it out. When you copied my expression into the playground, you unwittingly, but correctly, added braces around the for loop. I failed to notice previously that every label was showing only the last word of the name; I was only paying attention to the Mac names. After adding the braces, many more street names magically popped into the map! Thanks! For posterity, here's the corrected expression: if (!IsEmpty($feature.STREET)) {
var words = split(upper($feature.STREET), " ")
var Mac = ["MACCUMBER", "MACKAY", "MACKENZIE", "MACMILLAN", "MACRAE"]
var dir = proper(DomainName($feature, 'DIR'))
var street = ""
var type = proper(DomainName($feature, 'TYPE'))
for (var i in words) {
var isMac = indexof(Mac, words[i]) > -1
if (left(words[i], 2) == "MC") {
street += upper(words[i][0]) + lower(words[i][1]) + upper(words[i][2]) + lower(right(words[i], count(words[i]) - 3)) + " ";
} else if (isMac) {
street += upper(words[i][0]) + lower(words[i][1]) + lower(words[i][2]) + upper(words[i][3]) + lower(right(words[i], count(words[i]) - 4)) + " ";
} else {
street += iif(IsNan(number(words[i][0])), proper(words[i]), lower(words[i])) + " ";
}
}
return concatenate([dir, street, type]," ");
} else {
return "";
}
... View more
11-20-2019
09:00 AM
|
4
|
0
|
1290
|
|
POST
|
I discovered there are also some "Mac" street names to consider, too. The problem is, "Mac" can't be called out universally like "Mc", so I have to have a whitelist of "Mac" names to consider. I am now using every bit of new Arcade logic that I've learned from Ciara on this thread. I got it to work with most of the Mac names I have, except one problem: it doesn't work if "Mac" is preceded by another word, e.g. "Old MacCumber Station". The resulting label is just "Station". I'm afraid I've tapped out my Arcade knowledge... do you know what I need to change for it to work properly? Thank you! if (!IsEmpty($feature.STREET)) {
var words = split($feature.STREET, " ")
var Mac = ["MACCUMBER", "MACKAY", "MACKENZIE", "MACMILLAN", "MACRAE"]
var dir = proper(DomainName($feature, 'DIR'))
var street = ""
var type = proper(DomainName($feature, 'TYPE'))
for (var i in words)
var isMac = indexof(Mac, words[i]) > -1
if (left(words[i], 2) == "MC") {
street += upper(words[i][0]) + lower(words[i][1]) + upper(words[i][2]) + lower(right(words[i], count(words[i]) - 3)) + " ";
} else if (isMac) {
street += upper(words[i][0]) + lower(words[i][1]) + lower(words[i][2]) + upper(words[i][3]) + lower(right(words[i], count(words[i]) - 4)) + " ";
} else {
street += iif(IsNan(number(words[i][0])), proper(words[i]), lower(words[i])) + " ";
}
return concatenate([dir, street, type]," ");
} else {
return "";
} Side note to the Esri community webmaster: shouldn't Arcade be added to the the code block language options?
... View more
11-20-2019
07:41 AM
|
2
|
2
|
12576
|
|
POST
|
Here's the code I'm currently using, in case it's helpful to anyone. There are many nulls and blanks in our street names (I have no control over them) so I have to filter those out first (as covered in this thread), as well as concatenate the other pieces of the street name. I added one special condition to look for, "Mc", and could add more using this if-else logic if needed. Fortunately, I don't have many street names needing special formatting like Ciara mentioned. if (!IsEmpty($feature.STREET)) {
var words = split($feature.STREET, " ")
var dir = proper(DomainName($feature, 'DIR'))
var street = ""
var type = proper(DomainName($feature, 'TYPE'))
for (var i in words)
if (left(words[i], 2) == "MC") {
street += upper(words[i][0]) + lower(words[i][1]) + upper(words[i][2]) + lower(right(words[i], count(words[i]) - 3)) + " ";
} else {
street += iif(IsNan(number(words[i][0])), proper(words[i]), lower(words[i])) + " ";
}
return concatenate([dir, street, type]," ");
} else { return "";
} Thanks again to Kory and Ciara.
... View more
11-20-2019
06:33 AM
|
4
|
0
|
12576
|
|
POST
|
Thank you, Ciara. I know there's no one perfect solution, but you're giving exactly what I had hoped for: examples of how to apply similar methods/logic of Python in Arcade.
... View more
11-19-2019
07:42 AM
|
2
|
0
|
12576
|
|
POST
|
Sorry for being a bit insensitive above; I'm very appreciative of all the help I've received here on GeoNet. I am always trying to cobble together solutions with my limited knowledge of Python and now Arcade. I get exasperated with the transition occasionally. I imagine Ciara's expression would in fact work as intended with a tweak or two. But the bigger issue is that I suspect Arcade simply doesn't have methods equivalent to Python's for this problem (yet). That makes sense; Python's been around many years and Arcade is still pretty new. Seeing as Arcade is entirely under Esri's control, there are many map-specific issues that should be incorporated into Arcade. For instance, wouldn't it be nice if Proper() simply handled case properly including ordinals? Is there some reason that would be undesirable or unworkable? Thanks.
... View more
11-18-2019
11:44 AM
|
0
|
7
|
12576
|
|
POST
|
Thanks for the video link; that heads me in the right direction. However, it doesn't totally fix the problem. Her example explicitly lists out 1ST, 2ND, etc. rather than a regex or some Arcade equivalent to Python's isalpha, capitalize, or capwords methods that handle any ordinals. I wondered if it would work on two or more digit ordinals and I verified it doesn't with my own data. I thought maybe I made a typo when copying her function, but I even went back and watched the video again to see if any two-digit ordinal streets are visible: Yep, and indeed the case wasn't fixed in her own example (see "12Th" below). I laughed a little when she said, "I can write quite a simple expression to fix that." It's 10 times longer than the Python solution, which actually handles any ordinal! Surely there's a better way to do this with Arcade?
... View more
11-18-2019
08:59 AM
|
0
|
8
|
12576
|
|
POST
|
The Proper() Arcade function is a handy way to format street names that are stored in all caps. But it doesn't deal with ordinals correctly; e.g., returns "16Th" rather than "16th". There are a few different ways to handle this in Python but I don't know how to do it with Arcade. Any ideas? Thanks!
... View more
11-15-2019
12:35 PM
|
0
|
11
|
14425
|
| Title | Kudos | Posted |
|---|---|---|
| 4 | 09-09-2024 12:05 PM | |
| 2 | 11-20-2019 07:41 AM | |
| 1 | 06-20-2024 07:43 AM | |
| 1 | 07-13-2022 09:50 AM | |
| 1 | 12-11-2023 06:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|