POST
|
What I do as have a method to log onto the portal. This cannot be done using the ChallangeHandler, you have to do yourself. But this allows having a full portal login to the Portal itself, instead of specific resource protected readonly string ServerUrl = "https://www.arcgis.com/sharing/rest";
//protected readonly string ServerUrl = "https://machine.domain.loc/portal/sharing/rest";
public async Task<ArcGISPortal> OpenPortalAsync(bool refresh = false)
{
try
{
if ( _portal == null )
{
var credential = await AuthenticationManager.Current.GenerateCredentialAsync(new Uri(ServerUrl));
RefreshToken(credential);
AuthenticationManager.Current.AddCredential(credential);
_portal = await ArcGISPortal.CreateAsync(new Uri(ServerUrl));
PortalUser = _portal.User;
ConnectionStatus = ConnectionStatus.Connected;
}
else
{
if ( !refresh ) return _portal;
var token = (TokenCredential)await AuthenticationManager.Current.GetCredentialAsync(
new CredentialRequestInfo { ServiceUri = new Uri(ServerUrl) }, false);
if ( token != null ) await token.RefreshTokenAsync();
}
return _portal;
}
catch (Exception e)
{
_log.Debug(e.Message);
ConnectionStatus = ConnectionStatus.NotConnected;
return null;
}
}
... View more
01-24-2024
10:00 AM
|
1
|
0
|
175
|
POST
|
Curious what version of XCode you have installed on your build mac. This sounds like an XCode 15 issue as opposed to a Mobile API issue. With XCode 15 you will definitely see issues on iOS 16.x
... View more
12-28-2023
08:52 AM
|
0
|
0
|
200
|
POST
|
Are you calling LoadAsync ? You need to explicitly Load tables/layers, etc
... View more
11-30-2023
10:39 AM
|
1
|
2
|
320
|
POST
|
@TonyWakim I deleted that post because I jumped the gun. After the first replica I generated which did not duplicate other replicas have duplicated. So my thought of it having something to do with the single machine env. vs. a multiple machines server farm was incorrect
... View more
11-16-2023
06:18 PM
|
0
|
1
|
327
|
POST
|
@TonyWakim, @JenniferNery I did run against that services using just a user name and password login and I only see one new replica added to the service. Are you using both hosted services in the test cases? I am just trying to think of things different. We are using a HANA database and the services use reference data, not hosted. The way the application works is: User connects to portal using an OAuth Authorization (that uses SAML in this case) An interface is presented that allows the user to select the PortalItem to generate a replica from The user selects an output folder, and the output path is created The code above is used to create the replica. I have looked at the Jobs folder while doing this and only see a single job created so I am not sure what process possibly creates the second replica. But so far this seems to happen on every replica I generate. Looking at other things, last night I ran my tool four times on a service I have (single feature class). I have eight replicas show in the ArcGIS Server UI. The first one in each set named Ags_Fs Another strange thing I notice, if I look in Pro the only ones I see are the ones that have none Ags_Fs names:
... View more
11-16-2023
05:22 AM
|
0
|
0
|
358
|
POST
|
This is integrated into a pretty elaborate offline data management tool, so just pointing to a service is a pretty significant amount of changes. Do you have replica tracking on for these datasets used for the services?
... View more
11-15-2023
06:34 PM
|
0
|
2
|
370
|
POST
|
@MarceloMarques Tudo Ben? It's been ages since I have bumped into you. Hope all is well Best Regards, Joe Hershman
... View more
11-10-2023
12:40 PM
|
1
|
1
|
405
|
POST
|
I have a tool for taking data offline which uses the GeodatabaseSyncTask var gdbSyncTask = await GeodatabaseSyncTask.CreateAsync(serviceItem.ServiceUrl);
string replicaPath = $"{ConfigurationSettings.OutputFolder}\\{serviceItem.Title}.geodatabase";
var envelope = Geometry.FromJson(ConfigurationSettings.FullExtent)?.Extent;
var parameters = await gdbSyncTask.CreateDefaultGenerateGeodatabaseParametersAsync(envelope);
parameters.UtilityNetworkSyncMode = UtilityNetworkSyncMode.None;
job = gdbSyncTask.GenerateGeodatabase(parameters, replicaPath);
await job.GetResultAsync(); What I notice is that when I look at ArcGIS Enterprise at the /replica (https://serverName.domain.loc/server/rest/services/Mobilelayers/OfflineNetwork/FeatureServer/replicas) endpoint on the feature service there are two replicas created When I look at the .geodatabase generated it seems that the file always points to the second one. I am using branch versioning for the first time, is this expected behavior with branch versioned data? With standard archive data only a single replica was ever created (same tool, different ArcGIS Enterprise)
... View more
11-10-2023
06:52 AM
|
0
|
8
|
483
|
POST
|
I have a tool for taking data offline which uses the GeodatabaseSyncTask which uses the Mobile API What I notice is that when I look at ArcGIS Enterprise at the /replica (https://serverName.domain.loc/server/rest/services/Mobilelayers/OfflineNetwork/FeatureServer/replicas) endpoint on the feature service there are two replicas created When I look at the .geodatabase generated it seems that the file always points to the second one. I am using branch versioning for the first time, is this expected behavior with branch versioned data? With standard archive data only a single replica was ever created (same tool, different ArcGIS Enterprise)
... View more
11-10-2023
06:52 AM
|
0
|
0
|
128
|
POST
|
There is a post in Enterprise Builder section about ArcGIS Enterprise 11.2 What's Coming in ArcGIS Enterprise 11.2 but besides that post I can find nothing about version 11.2. Is there any additional information about 11.2, schedule, features, etc. We are in the process of deploying an 11.1 installation of ArcGIS Enterprise and am trying to determine if we should be looking at doing any immediate update prior to having content created. Thanks -Joe
... View more
11-08-2023
05:05 AM
|
0
|
6
|
560
|
BLOG
|
Besides the updates to Enterprise Builder, what are there updates in 11.2? We are mid-rollout at 11.1, should we be looking at upgrading? Is there any upgrade documentation?
... View more
11-07-2023
01:16 PM
|
1
|
0
|
1893
|
POST
|
Attached is a sample of Prism setup using the sample app shown in help. Even with the APIKey I am getting a token error, but the general setup of Prism with injecting IEventAggregator all works
... View more
11-02-2023
04:29 PM
|
1
|
1
|
603
|
POST
|
So if you are using Prism, then you should be using the Prism container. I think Prism 7 had an Autofac version, but they depreciated that. starting at Prism 8. I would suggest Prism.DryIoc as that is the direction they are moving with Prism 9. You want to add one of the Prism packages with a container either Prism.Unity or Prism.DryIoc and then let Prism do the rest Prism provides a method in App.Xaml.cs to override with registrations. protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.Register<IComboBoxItem, ComboBoxItem>();
containerRegistry.Register<IToolbarCommand, ToolbarCommand>();
containerRegistry.RegisterSingleton<IConnectionCheck, PortalConnectionCheck>();
containerRegistry.RegisterSingleton<ILog4NetFacade, Log4NetLogger>();
//If you did not have Modules or Regions you could register a view for Navigation here
containerRegistry.RegisterForNavigation<MobileAppMapView, MobileAppMapViewModel>();
} If you have Modules the initialization is done in the IModule implementation and would be along these lines /// <summary>
/// Map Module is primary application module responsible for inital loading
/// of the map and all interations with the MapView
/// </summary>
public class MapModule : ModuleBase
// I have a ModuleBase class that implements IModule so that common initialization code is put there
{
public override void RegisterTypes(IContainerRegistry containerRegistry)
{
base.RegisterTypes(containerRegistry);
containerRegistry.Register<IMapLoadService, MapLoadService>();
}
public override void OnInitialized(IContainerProvider containerProvider)
{
base.OnInitialized(containerProvider);
//RegionManager comes from base class this is is how one gets RegionManager in Module
// RegionManager = containerProvider.Resolve<IRegionManager>();
RegionManager.RegisterViewWithRegion(RegionNames.MapRegion, typeof(MobileAppMapView));
}
} There is no need to be setting a DataContext, Prism does that for you As an aside: I would avoid naming my View MapView, I find this confuses things sometimes because it is the same name as the esri class
... View more
11-02-2023
09:17 AM
|
1
|
0
|
614
|
POST
|
You still haven't mentioned what framework you are using. You should be able to inject the IEventAggregator into the View code behind. Prism will handle this. I have WPF and Xamarin Forms code that use this approach for events associated to View updates or actions public MobileAppMapView(IEventAggregator eventAggregator)
{
_eventAggregator = eventAggregator;
InitializeComponent();
WireUpMapViewEventHandlers(eventAggregator);
SetupEventListeners(eventAggregator);
} I have not done this with a View using regions in Xamarin, because when I originally built out my Xamarin architecture Prism hadn't introduced Regions in Xamarin yet. But it should still work
... View more
11-02-2023
06:11 AM
|
1
|
4
|
637
|
POST
|
You don't actually say what you are developing in. If you have Prism setup, I would use the CommandToEvent from Prism instead of the MAUI toolkit like Morten shows below. But basically same principle. As a rule if using Prism stick with all of their implementations, don't mix and match MAUI toolkit and Prism implementations Or you could just fire your own events, which is what I have done. You can inject IEventAggregator into the code behind that has the MapView . I create an Event for each of the MapView interactions and wire them up private void WireUpMapViewEventHandlers(IEventAggregator eventAggregator)
{
MapView.GeoViewTapped += (s, e) => { eventAggregator.GetEvent<GeoViewTappedEvent>().Publish(e); };
MapView.GeoViewDoubleTapped += (s, e) => { eventAggregator.GetEvent<GeoViewDoubleTappedEvent>().Publish(e); };
MapView.GeoViewHolding += (s, e) => { eventAggregator.GetEvent<GeoViewHoldingEvent>().Publish(e); };
MapView.ViewpointChanged += (s, e) => { eventAggregator.GetEvent<ViewpointChangedEvent>().Publish(MapView.VisibleArea.Extent); };
MapView.NavigationCompleted += (s, e) => { eventAggregator.GetEvent<NavigationCompletedEvent>().Publish(MapView.VisibleArea.Extent); };
} This way everything if just published and I can hook into in any Module
... View more
11-01-2023
03:50 PM
|
1
|
6
|
669
|
Title | Kudos | Posted |
---|---|---|
1 | 01-24-2024 10:00 AM | |
1 | 08-03-2023 04:14 AM | |
1 | 11-30-2023 10:39 AM | |
1 | 11-10-2023 12:40 PM | |
1 | 11-07-2023 01:16 PM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|