|
POST
|
Have you tried the wantsToShowViewController(ofType:) delegate method? I haven't tried it but if the type is AGSPopupViewControllerTypeWeb then you could take a custom action. If it's not, then you should still present the view controller using the parameters passed into the delegate method. Does that do what you need?
... View more
10-07-2021
04:09 PM
|
0
|
0
|
1641
|
|
POST
|
It certainly sounds like everything's set up correctly. When you get the AGSGenerateOfflineMapResult once the AGSGenerateOfflineMapJob completes, is hasErrors true? If so, what errors are provided in the layerErrors dictionary?
... View more
09-27-2021
01:58 PM
|
0
|
1
|
1967
|
|
POST
|
Hi Thomas. When you're working with an already downloaded offline map, there's no authentication (authentication happens when accessing the services), so you won't see the Authentication Manager workflow in play. Note, that has changed slightly as of 100.9, in that you can download an offline map that contains references to online layers which can be used if there's a network connection (e.g. traffic, or weather). However, that's not happening in this case.
... View more
09-27-2021
01:55 PM
|
0
|
0
|
1968
|
|
POST
|
Are you holding on to the `portal` instance? If it gets deallocated before the round trip to the server, then the completion handler won't get called. Can you make it an instance variable?
... View more
09-23-2021
04:46 PM
|
0
|
2
|
1586
|
|
POST
|
Hi. Just to check a couple of things: Are the layers in the group layer enabled for taking offline? A group layer is just a container, so it's really authenticating the layers within the group layer that matters. Each of those layers should be offline enabled. If they're not enabled for offline use, then you can control what should happen with them using the onlineOnlyServicesOption on AGSGenerateOfflineMapParameters. Are there any errors being returned for those layers when taking the map offline? Take a look in the layerErrors property on the AGSGenerateOfflineMapResult. From a permissions perspective, if you can authenticate to view the layer, and the layer is configured for offline use, then you should be good to go. I will check whether GroupLayer is expected to work with offline maps (I think they should). You could try pulling the layers out of the group layer as a test. Group layers should work. I'd check that the layers are enabled for offline use. See the doc here for more info: https://doc.arcgis.com/en/arcgis-online/manage-data/take-maps-offline.htm#ESRI_SECTION1_C0331D55CAE14D4FAB1B54354A9246F2 Update: You could also try the Capabilities Check and see what's supported.
... View more
09-23-2021
09:38 AM
|
0
|
0
|
1998
|
|
POST
|
Since this is a new problem, not related to migrating layers from 10.2.4 to 100.1, please start a new thread in the forum. A good title might be "Map displays in simulator but not on device". That will help people know if they can step in and help. Others may also have the same issue and they'll be able to find this thread and see how we resolve it. And please be sure to include details about the error. That was missing from your last reply above. Thank you!
... View more
09-23-2021
07:58 AM
|
0
|
0
|
6027
|
|
POST
|
Note also that you can lean on the keychain to reduce the frequency with which users will be asked to log in. You can look at AGSAuthenticationManager.shared.credentialCache and call enableAutoSyncToKeychain(). This will securely cache credentials in the keychain, ready for your user to use next time they open the app.
... View more
09-22-2021
02:13 PM
|
0
|
1
|
2543
|
|
POST
|
Hi Marc, 7-20 seconds for a handful of features surprises me. Some thoughts: I assume the shapefile is not on a network share. Is that correct? Is this a spatial query, or just an attribute query? Are the features in the shapefile complicated polygons or polylines? You could try calling QueryExtentAsync and see if that improves things. If you also need attributes from the features, you could make a separate query and specify not to return geometries. Let us know if any of those things help. Are you able to share the shapefile? You can DM me to share that if you are able to.
... View more
09-21-2021
07:47 AM
|
1
|
1
|
3028
|
|
POST
|
Hi @NickRobles2 , We're trying to work out where to move the question to get you the best answer. Can you tell me a bit more about why the back-end will interact with services rather that the app doing that? And does it have to be built in Java, or are you open to other technologies? A little background, probably you know a lot of this: The general model we follow for web apps is to let the services do any interaction with the db, abstracting direct db access into a set of REST APIs. Those REST APIs (which also cover other things you mentioned, like query, edit, working with attachments, reading service metadata, etc.) are documented here: https://developers.arcgis.com/rest/ We have many APIs that work with those REST APIs, and they broadly break down into APIs for working directly with services, and APIs for building 2D/3D apps using those services. The former are a couple of APIs that wrap GET/POST/etc. calls to the REST APIs: the ArcGIS REST JS API, and the ArcGIS API for Python. The Python API has been around longer and has more capabilities, but is for building apps and scripts that process data, so probably not what you want. ArcGIS REST JS is more suited to building a server-side component to support web clients. This sounds closest to what you're asking for, but is JavaScript. Of the group of APIs we have for building 2D and 3D apps, there is the ArcGIS API for JavaScript, and the ArcGIS Runtime SDKs. Both are meant for building apps, and using Runtime SDKs to build a backend services is against our terms and conditions. One other potential option: If you already have ArcGIS Enterprise and expose services, and just want to expose more sophisticated behavior for those services, then Server Object Extensions (SOEs) and Server Object Interceptors (SOIs) are likely a good solution. It boils down to: Do you really need to have this logic in the back-end or can it be in the web app, hitting services? If SOEs and SOIs will do the job for you, I'll move this question over to here. If not, you'll need to keep working with the REST services. If the backend can be written in JavaScript, you might be able to lean on the ArcGIS REST JS API. Does that help?
... View more
09-20-2021
10:22 AM
|
0
|
0
|
4688
|
|
POST
|
Sure thing. One additional nicety to note about AGSRequestConfiguration is that you don't have to log globally. Any class that implements AGSRemoteResource can have its own AGSRequestConfiguration set, so you can log just for a specific table, layer, or task, for example. Something like… if let rc = AGSRequestConfiguration.global().copy() as? AGSRequestConfiguration {
rc.debugLogResponses = true
myTroublesomeTiledLayer.requestConfiguration = rc
} And it is strongly recommended that you do NOT log in production releases. There is a definite performance and resource overhead. Of course, sometimes that's necessary to get to the bottom of an issue, but make that a strictly opt-in and temporary process (ideally, say, with a special build or TestFlight release).
... View more
09-15-2021
12:55 PM
|
1
|
0
|
2104
|
|
POST
|
I've spoken with the team some more about this, and it's deliberate and one of the issues we plan to address over the next few releases. A little background: the initial Runtime vector tile layer implementation focused on basemaps, so we were able to make certain assumptions about layer visibility, and that is likely why requests are be being made despite the layer being out of visible range. Separately, as I mentioned, overzooming is why we request data outside of the configured visible range. For example: in the Pacific, there may be no need to bake level 12 tiles for a given area when the single level 2/3/4/5 etc. tile works fine. Tiles and overzoom for vector tiles That's discussed a little more here. Hope that helps.
... View more
09-15-2021
09:30 AM
|
0
|
2
|
2112
|
|
POST
|
Hi @kris. Thanks for the question and the details. One thing springs to mind: When are you setting the AGSMapView's viewpoint? If your AGSMap has an initialViewpoint set, and you animate to another viewpoint, then if at some point (initial viewpoint, or during the animation) the vector tile layer is within visible scale range, it's possible it could trigger a tile request. And because we use overzooming, we might need to fetch these higher level tiles. By the time the map view settles into its new viewpoint, we won't display the data. To help debug, you could try adding the layer once the map view has displayed (just throw in a timer delay for this test) and see if you still see the requests. You can also use AGSRequestConfiguration.global().debugLogRequests and debugLogResponses to output these requests to the console. If it is the case that setting the AGSMapView's viewpoint is triggering this, you could try setting the initialViewpoint on the AGSMap (you can do this before you load it), or setting the AGSMapView viewpoint immediately without an animation. That should override any stored initialViewpoint on the map and avoid any MapView viewpoint transitions. I've made a lot of assumptions there of course, so let me know if your code isn't doing anything to trigger this.
... View more
09-15-2021
06:51 AM
|
0
|
3
|
2117
|
|
POST
|
Your code looks like it's doing the right things but I can't tell what's going wrong based off that screenshot. Is TianDiTuWMTSLayer a subclass of AGSWMTSLayer? How are you instantiating the AGSWMTSLayer superclass from within your initializer? What are the services being accessed? The first screenshot shows an authentication challenge from ArcGIS.com. Is that expected? Where are your two map layers hosted? I expect there's something failing on map load, or the service isn't responding as expected. You can find out more by calling load on your AGSMap and seeing if there's an error on map load. That could help you home in on the problem. You can also use AGSRequestConfiguration to output debug logs to the console. Get the singleton globalConfiguration and set debugLogResponses to true. Hope that helps.
... View more
09-13-2021
08:44 AM
|
0
|
0
|
1785
|
|
POST
|
There is another way to download the MMPK. You can use AGSRequestOperation. The advantage here is that you have access to the download progress, and you can also avoid having to create a large Data object in memory. The AGSRequestOperation can stream the download directly to your file. You would do something like this: func downloadMMPK(from portalItemForMMPK: AGSPortalItem) {
portalItemForMMPK.load { [weak self] error in
guard let self = self else { return }
if let error = error {
print("Unable to load the portal item: \(error.localizedDescription)")
return
}
guard let portalUrl = portalItemForMMPK.portal.url,
let itemDataUrl = URL(string: "\(portalUrl)/sharing/rest/content/items/\(portalItemForMMPK.itemID)/data"),
let docsFolder = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { return }
let mmpkLocation = docsFolder.appendingPathComponent(portalItemForMMPK.name, isDirectory: false)
let request = AGSRequestOperation(url: itemDataUrl)
request.outputFileURL = mmpkLocation
request.registerListener(self) { result, error in
if let error = error {
print("Unable to download the file: \(error.localizedDescription)")
return
}
guard let result = result as? URL,
result.isFileURL else { return }
let mmpk = AGSMobileMapPackage(fileURL: result)
mmpk.load { error in
if let error = error {
print("Unable to open the mmpk file: \(error.localizedDescription)")
return
}
if let mapFromMMPK = mmpk.maps.first {
self.mapView.map = mapFromMMPK
}
}
}
request.progressHandler = { (downloaded, total) in
print("Downloaded \(100 * downloaded/total)%. \(total - downloaded) bytes remaining")
}
self.progressView.observedProgress = request.progress
AGSOperationQueue.shared().addOperation(request)
}
} Note, in that code, I've added a ProgressView to my ViewController. I'm actually showing progress twice - once printed to the console in the AGSRequestOperation's progressHandler, and at the same time by just having my UI's ProgressView lean on the AGSRequestOperation's progress object. The key is defining the outputFileURL property on the AGSRequestOperation. If you do that, the registered listener will be passed a URL object, otherwise it'll get a Data object.
... View more
09-08-2021
02:15 PM
|
0
|
3
|
4069
|
|
POST
|
Hi. I expect that the AGSPortalItem is going out of scope and is being released before fetchData completes and calls into the completion block. Try keeping a strong reference to the AGSPortalItem (maybe make it a var on your class instance). You can nil it out from within the completion block if you need to.
... View more
09-08-2021
07:26 AM
|
0
|
0
|
4077
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-14-2026 07:07 AM | |
| 2 | 04-30-2026 10:59 AM | |
| 4 | 04-22-2026 08:07 AM | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |