|
POST
|
I will try to find some time in the next couple of days to do this @ShaunWalbridge . Before I uninstall the Pro SDK, I need to tie up a few loose ends in the Pro SDK project I'm working on 😅
... View more
03-22-2023
07:48 AM
|
0
|
10
|
2410
|
|
POST
|
Does downgrading to Pro 3.0.x solve the issue? I'm hesitant to go through the effort so far until I know this can solve it for sure
... View more
03-22-2023
07:43 AM
|
0
|
0
|
2412
|
|
POST
|
Hi @ShaunWalbridge , Thank you for your reply. Testing further, this issue can be replicated for me in Powershell, Command Prompt or any other shell. If I can start python in the shell, then import arcpy and run any command that requires a filepath, the above error is produced. I do separate work with the Pro SDK for .NET and some other Maps SDK for .NET projects, but I don't use console or shell for them, if that answers your question. Thanks!
... View more
02-27-2023
04:21 PM
|
0
|
1
|
5245
|
|
POST
|
I have been running my python script that uses arcpy, from Powershell without any problems. But in the middle of a session, I thought to update ArcGIS Pro from 3.0.1 to 3.1 and my script immediately stopped working. I run my script from Powershell using propy (the propy.bat file location is added to my environmental variables). The following error is produced: Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'ArcGIS.Core, Version=13.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86'. The system cannot find the file specified.
File name: 'ArcGIS.Core, Version=13.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86'
at ArcGIS.Core.Internal.PluginWorkspaceFactoryShim.FinalConstruct(PluginWorkspaceFactoryShim* )
at ATL.CComPolyObject<ArcGIS::Core::Internal::PluginWorkspaceFactoryShim>.FinalConstruct(CComPolyObject<ArcGIS::Core::Internal::PluginWorkspaceFactoryShim>* )
at ATL.CComPolyObject<ArcGIS::Core::Internal::PluginWorkspaceFactoryShim>.CreateInstance(IUnknown* pUnkOuter, CComPolyObject<ArcGIS::Core::Internal::PluginWorkspaceFactoryShim>** pp)
at ArcGIS.Core.Internal.PluginWorkspaceFactoryShim.CreateInstance(IAddInRecord* pAddinRecord, IUnknown* controllingUnknown, IUnknown** ppPluginWorkspaceFactory)
at PluginFactory.CreateObject(PluginFactory* , IAddInRecord* pAddinRecord, IUnknown* pUnkOuter, IUnknown** ppPluginWorkspaceFactory) This only happens when a method that takes a file name or location as a parameter is run. For instance, the following doesn't produce an error: arcpy.env.overwriteOutput = True // no error But this does: arcpy.env.workspace = "location of gdb" //error and so does this: arcpy.Exists("location of gdb that exists") //error but the following doesn't produce an error; just prints False. arcpy.Exists("") //no error I've tried restarting my Windows and rechecking environmental variables in Systems Settings. The same commands run fine from within ArcGIS Pro's python window. As far as I could tell, this started happening after I upgraded to Pro 3.1 Anyone have any idea what could be wrong here? I need to use propy or python to run my script from the shell. Both python or propy commands from shell give same error
... View more
02-26-2023
08:27 PM
|
1
|
31
|
12024
|
|
POST
|
Thanks for the response, @TrevorFrame . We were looking for a solution that would let the user bypass the OAuth login screen by supplying the application with portal token from the code. In our case, we didn't want the user to see the login screen even once. To solve this problem, we ended up creating our own MapViewer template application from scratch that customized Authentication to exactly what we needed. Appreciate the AppStudio team and all the great work that you guys do! 👏
... View more
02-17-2023
02:37 PM
|
1
|
0
|
1070
|
|
POST
|
Hello @CharlesMacleod , Thank you for this solution. This answers my original question. Playing with this further, however, the LayersPane Combobox does not update when a new layer is added. The way AllMapLayers is bound to the ComboBox ItemsSource property, does it not allow automatic updating? I also used the LayersAddedEvent, by running the following when triggered. _allMapLayers = activeView.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().ToList(); While this does actually update the _allMapLayers variable (I was able to verify using a Dialogs.MessageBox which displayed total layer count in the map), it doesn't update the combobox on-the-fly. The LayersPane sample you provided doesn't have this functionality either. What's the best remedy here? Thanks for your time!
... View more
12-30-2022
11:56 AM
|
0
|
0
|
1514
|
|
POST
|
I'm working on an Add-In and need to be able to use layers that are currently added in the Map's content pane. I would like to see if there is a ProSnippet that lets me directly add this component. The component that I would like to use looks like this and I see it all around ArcGIS Pro. It also lets you use geometry that you create on-the-fly. The closest thing I could find was using a ComboBox in combination with Map class's GetLayersAsFlattenedList method. But this still leaves a lot of functionality missing from the component I would've like to use.
... View more
12-16-2022
04:09 PM
|
0
|
4
|
1612
|
|
POST
|
I have a custom application in AppStudio that uses the MapViewer template to display a secured webmap retrieved from the client's Enterprise portal. I want the user to start my map viewer template application and be able to view the map and layers without logging in. Instead, I have a portal token that is generated elsewhere in my custom application that I would like to authenticate the user with. But in my research, I've not found a way to authenticate with anything but oAuth. Here's how far I got: In SignInPage.qml (located in views directory), there is the authenticationChallenge signal that gets called from AuthenticationController.qml (located in views/Controller directory). The challenge parameter that gets passed in (AuthenticationChallenge) has a Enums.AuthenticationChallengeType value of Enums.AuthenticationChallengeTypeOAuth. The specific question that I have is this: Is there any way to trigger this authentication challenge with a different challenge type than OAuth? Like Enums.AuthenticationChallengeTypeUsernamePassword ? Perhaps, I could start with authenticating using username/password and then move on to portal token authentication. TLDR: I want to authenticate a secured map from Portal in MapViewer without requiring my users to log in. I would like to authenticate using pre-generated portal token instead of authenticating on the spot with OAuth which requires the user to log in.
... View more
12-16-2022
03:12 PM
|
0
|
2
|
1281
|
|
POST
|
In Map Viewer's map page, there is a behavior that the basemap is exhibiting which seems like a bug. If I change the basemap to "Imagery" or "Imagery with Labels", and tap on a feature (belonging to a vector layer in the webmap), the imagery tile data is also added to the attributes list. Not sure if this is intentional, but in my experience, most use cases of Map Viewer or any map interaction do not require seeing metadata for imagery. This can also be replicated by simply tapping on the imagery basemap. See below screenshot. If I were also clicking on a geometry point feature in this area, I would have 43 different items in my attributes list to navigate through. This is a pain to interact with. Any plans on fixing this in a future update? My current plan is to fix this within the code and re-deploy Map Viewer to our current applications that use the template. Thank you!
... View more
07-22-2022
02:17 PM
|
1
|
0
|
625
|
|
POST
|
There is what appears to be a bug in Map Viewer 5.4, where filters applied to the webmap in the Portal/Online where the webmap is used, are not respected within the map in Map Viewer. We have some applications that use Map Viewer as a base, and this has been identified as a mostly consistent, replicable problem. To replicate, see following steps: 1. In Portal, create a webmap and add a feature layer. In Table of Contents, apply a filter to this layer. Ideally, this is a layer that you can easily check visually to determine whether the filter has been applied to later. Save webmap and use item ID in your Map Viewer sample within settings. 2. Open up Map Viewer and visit the map page to see the webmap. The filter will likely be applied correctly in this view. 3. Tap the "i" button on the top navbar and then the "Layers" tab to see the list of layers. 4. With the list of layers open on the screen, tap a feature on the map for the layer that you applied the filter to earlier. The layer on the map removes the filter at once and we're possibly looking at a map that is very different from the webmap it's supposed to emulate. If you still can't replicate the bug, then turn the layer off/on in the list and click on the feature again. Playing with the map like this consistently produces the bug. In MapViewer 5.3, the issue took less steps to replicate, as you could see the filter was not applied at all when the map page loads. Has anyone else ran into this issue? How did you solve it? I'm digging through the MapPage code here, trying to see where the filters are getting reset or where they should be applied. I'm also trying to create a standalone application with a Map Viewer and Map component that references a webmap, to see if this is a general problem with the Map Component or just a Map Viewer issue. For a visual representation of this, see below. A screenshot of my webmap in ArcGIS Online that shows the filter correctly applied: A video of what Map Viewer looks like with the issue present: Thank you!
... View more
07-22-2022
11:30 AM
|
0
|
1
|
750
|
|
POST
|
Hello @JamesBallard1 , I had to revisit this problem due to a situation in which my team could not use Renderer (see here for issue from colleague) and I have narrowed down when PortalItem does and doesn't work. Basically, if the item being used is a hosted feature layer, it works. If the feature layer is not hosted, then it doesn't. Again, this used to work in AppStudio 4 and earlier Runtime Qt versions. I do not have an example to share with you, but hopefully you can try this with 2 different feature layer items, one of them hosted? Looking forward to hearing what you think
... View more
06-17-2022
09:31 AM
|
0
|
2
|
1487
|
|
POST
|
Thanks @JamesBallard1 , if I can figure out a way to create a Feature Layer from a reference MapServer layer (that's public) as is the case with the item in question, I will share that itemID in this thread. Can't seem to figure out how to do that yet. It really does seem like the issue is with FeatureLayer items created like this. Thank you for your help! Also, UniqueValueRenderer works great if I bring in the original service layer URL and change the symbology client-side. I could see it getting pretty annoying for more complicated symbologies that I can only create in Portal or ArcGIS Pro though.
... View more
04-22-2022
02:13 PM
|
0
|
0
|
1551
|
|
POST
|
Thanks for your response @JamesBallard1 I actually used the itemID you provided in your example, and turns out it renders fine on my map. So do other Feature Layer items in my Enterprise Portal. So it's just the one Feature Layer I was using that doesn't render. The Feature Layer in question was created from a separate reference layer (probably published from Pro) that renders symbology based on values from a field. The reference layer exists separately in Enterprise. I'm trying to bring this original reference layer in and apply UniqueValueRenderer to it, hoping to replicate how the original FeatureLayer used to look. Again, no clue why this used to work in AppStudio 4 but not AppStudio 5.
... View more
04-22-2022
09:10 AM
|
0
|
5
|
1558
|
|
POST
|
I am trying to add an item from Enterprise Portal to MapView. I'm trying to add the item, which is a FeatureLayer using its itemID. See code below. MapView {
id:mapView
anchors.fill: parent
Map {
BasemapDarkGrayCanvasVector{}
initialViewpoint:
ViewpointCenter {
id:viewpoint
targetScale: 1.5e7
Point {
id: initPos
x: -11099972.04
y: 4014041.26
spatialReference: SpatialReference {
wkid: 102100
}
}
}
}
FeatureLayer {
id: structuresInspectionStatusFS
name:"Structures"
visible: true
Component.onCompleted: {
mapView.map.operationalLayers.append(structuresInspectionStatusFS)
}
ServiceFeatureTable {
initItem: inspectionsStatusPortalItem
initLayerId: inspectionsStatusPortalItem.itemId
onLoadStatusChanged: {
}
onLoadErrorChanged: {
console.log(layer.name)
console.log("Error changed:", loadError.message)
}
onErrorChanged: {
console.log(layer.name)
console.log("Error2 changed:", error.message)
}
}
}
PortalItem {
id: inspectionsStatusPortalItem
itemId: //itemID
portal: portalMain
onLoadStatusChanged: {
if (loadStatus === Enums.LoadStatusLoaded){
structuresInspectionStatusFS.item = inspectionsStatusPortalItem
}
}
}
Portal {
id: portalMain
credential: portalCredential
url: "Portal URL"
Component.onCompleted: {
portalMain.load();
}
onLoadStatusChanged: {
if (portalMain.loadStatus === Enums.LoadStatusLoaded) {
inspectionsStatusPortalItem.load()
} else {
}
}
}
Credential {
id:portalCredential
username: "username"
password: "password"
}
Connections {
target: AuthenticationManager
onAuthenticationChallenge: {
if (challenge.authenticationChallengeType === Enums.AuthenticationChallengeTypeUsernamePassword) {
challenge.continueWithCredential(portalCredential);
}
}
}
} This used to work in AppStudio 4 and its Runtime, but now that I've upgraded to AppStudio 5 and latest Runtime, it doesn't work anymore. I get an "Invalid Argument" Error from the error signals on ServiceFeatureTable. I know it's not an authentication issue, because I have other FeatureLayers that I'm adding to the map and they work fine. The difference is that those FeatureLayer items don't get added as PortalItem. Any help is appreciated!
... View more
04-21-2022
09:25 AM
|
0
|
7
|
1618
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-12-2024 08:04 AM | |
| 2 | 12-06-2024 05:09 PM | |
| 2 | 12-06-2024 03:17 PM | |
| 2 | 12-05-2024 09:57 AM | |
| 1 | 06-07-2023 10:06 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-03-2025
06:31 AM
|