|
POST
|
150,000 is the max number of tiles we allow to prevent the service being overwhelmed by requests and to prevent the file system filling up with large packages of tiles waiting to be downloaded. It is set by the service administrator. When publishing and hosting your own services, you can control this value but it is not user-configurable for our basemaps. You can tell if you'll hit that limit by calling the estimate commands: Estimate Export Tile Size—ArcGIS REST API and Android estimateTileCacheSize(). When you have created an ExportTileCacheTask and pointed it at an Image Service and Loaded it, you can look at the Task's ArcGISMapServiceInfo to see what the max export tile count is (and for that matter if the service can even generate a TPK). If you need to take larger areas offline, the hosted tiled services might not be the right approach for you. VTPKs will be more efficient in that scenario (but we limit the tiles you can take offline in that scenario too). Taking the tiles offline is provided largely for Runtime app capabilities, so we encourage you to use those APIs. This forum isn't really the place to dig deep into the REST APIs. Hope that helps, Nick.
... View more
07-15-2019
01:10 PM
|
0
|
2
|
1530
|
|
POST
|
That’s correct, yes. It’s associated with the app regardless of the number of installs.
... View more
07-09-2019
06:55 AM
|
1
|
0
|
6723
|
|
POST
|
Sure thing Michael. Depending on what you need them for, you could also set the useAdvancedSymbology property to false on your feature table until this is resolved. See this conversation where Lucas offers some more details. That still doesn't help with Explorer/Collector users though, unfortunately.
... View more
07-08-2019
05:16 PM
|
1
|
1
|
1985
|
|
POST
|
[Edited just to add some thoughts since Nimesh already replied] The loadStatus is to do with Runtime having loaded enough metadata to make the AGSPortal instance usable, so that shouldn't change. I would also expect portalInfo (metadata) and user properties to remain unchanged. The user info may still be useful to you, even if Runtime no longer has a valid credential for it. So, when you call logout(), Runtime will invalidate the token (and AGSCredential) being used by the AGSPortal. If you perform another operation that requires authentication, it will fail and trigger an authentication workflow (e.g. OAuth, or just ask you for username and password, depending on how your app is configured). This API is left over from some earlier designs. We are working on a clearer API which will control credential validity through the AGSAuthenticationManager.
... View more
07-05-2019
01:09 PM
|
0
|
0
|
1175
|
|
POST
|
Hi Michael, Thanks for providing the JSON. Very helpful. I think you're hitting a bug introduced with the latest Windows update that affects Server and Desktop tools. See Feature layer not displaying in Explorer app, but displays in AGO and in particular Jeremy Wright's reply here. We are actively working with Microsoft on a fix and assessing all options to provide a fix as soon as possible. It seems some customers have been able to resolve the issue by rolling back the Windows patch but this is of course at best a poor compromise. Please monitor that thread for updates. We're confident we understand the issue but if you have configurations that aren't covered by the thread's explanation, do add your details there. Cheers, Nick.
... View more
07-03-2019
05:23 PM
|
0
|
3
|
1985
|
|
POST
|
While we consider ways to improve this experience, the recommended solution is to loop over the AGSMap.operationalLayers and call identifyLayer for each layer where identifyEnabled is true. It's what we do behind the scenes, but excluding the basemap layers. There do happen to be benefits to this approach for some use cases. In particular, you can provide more granular feedback to your users as each layer's results return. But of course you can also limit the layers being identified against. To coordinate the results, you could use a DispatchGroup. Create a group. Call enter() before you make each identifyLayer call and leave() when each call returns. Then you can use notify() to execute a block when all the identifies have completed. Call something like this (I haven't tested it!) from the AGSGeoViewTouchDelegate method: guard let operationalLayers = mapView.map?.operationalLayers as? [AGSLayer] else { return }
let identifyGroup = DispatchGroup()
var identifyResults: [AGSIdentifyLayerResult] = []
// Here we identify on all the identifiable layers.
for layer in operationalLayers where layer.isIdentifyEnabled {
identifyGroup.enter()
mapView.identifyLayer(layer, screenPoint: screenPoint, tolerance: 20, returnPopupsOnly: false) { (result) in
defer { identifyGroup.leave() }
guard result.error == nil else {
print("Error identifying on layer \(result.layerContent.name): \(result.error!)")
return
}
identifyResults.append(result)
}
}
// I've put this on the main queue assuming you want to update the UI.
// But if you need to do heavy processing on the identify results, consider using
// .global(qos: .userInitiated) instead and only dispatching back to main
// with DispatchQueue.main.async {} when you're ready to update the UI.
identifyGroup.notify(queue: .main) {
for result in identifyResults {
// Handle the identify results.
}
} Note that if you call the above code from some non-main thread (unlikely), you'll need to coordinate writing to the identifyResults array to be thread-safe. Hope this helps.
... View more
07-03-2019
01:29 PM
|
0
|
1
|
3139
|
|
POST
|
Hi Devendra. Firstly, don't use the Sample Servers. Those are for supporting samples only. They will not support a production app. Secondly, there are two types of basemaps. Raster Basemaps (with pre-baked pixel-based tiles) and Vector Basemaps (which are rendered on the fly in the client app). When you take them offline, Raster Basemaps will generate a .TPK file and Vector Basemaps will generate a .VTPK file. Thirdly, we have separate "For Export" raster basemaps and vector basemaps (see here - look at the descriptions to see which are vector). In the case of Raster basemaps, we have separate "For Export" versions to ensure that the performance of our standard basemaps is not impacted by requests to package them up to TPK files. In the case of Vector basemaps, you can generate a .VTPK from the standard or "For Export" versions, and the difference is that the "For Export" versions have fewer fonts embedded so make for a smaller file (usually about 75Mb smaller), though you might not get as rich global labeling so be sure to evaluate the suitability for your needs. Now, to your issue: Our basemaps are free but we require authentication to take them offline for measuring usage. One way to authenticate (which you mention) is with a named user. But another way, which will work in your scenario, is App ID authentication (note that at this time you cannot use App ID authentication to access any private data of yours hosted by us, but that's not relevant in this case). To use App ID you need to obtain a token by hitting the HTTPS token rest endpoint with a POST, passing in client_id, client_secret, a grant_type of "client_credentials", and optionally a duration. See this Swift example. And this documentation. Using the token you get back from the above REST call, you can create a new Credential which you can use with the calls to take the basemaps offline. To get the client_id and client_secret above, you must sign up for a free developers account over at ArcGIS for Developers then, in your dashboard, create a new Application. You can get Client ID and Client Secret from the new Application's summary page. Be aware that if someone gets hold of your Client ID and Client Secret, they effectively have access to your account to use up all your credits and manipulate your content so make sure you embed them securely in any app you distribute (if you suspect they've ever leaked, you can just create a new app, but that might involve deploying again). Note, you can do all that for free as long as you don't make any revenue from your app. If you do make revenue from the app, you will have to sign up for a Builder Plan which allows for commercial app deployment. Hope this helps. Nick.
... View more
07-03-2019
09:20 AM
|
3
|
2
|
6723
|
|
POST
|
FYI, the documentation for revokeToken went live with today's release of the developer's site: Revoke Token—ArcGIS REST API
... View more
07-02-2019
04:52 PM
|
0
|
0
|
4666
|
|
POST
|
For reference, here's the code I provided: import UIKit
import ArcGIS
class ViewController: UIViewController {
@IBOutlet weak var mapView: AGSMapView!
override func viewDidLoad() {
super.viewDidLoad()
let p = AGSPortal.arcGISOnline(withLoginRequired: false)
let portalItem = AGSPortalItem(portal: p, itemID: "<feature service item id>")
portalItem.load { (error) in
if let error = error {
print("Error loading portal item: \(error.localizedDescription)")
return
}
print("Service URL: \(portalItem.serviceURL)")
if let url = portalItem.serviceURL {
print("URL: \(url.absoluteString)")
}
print("Title (loaded): \(portalItem.title)")
print("Type: \(portalItem.typeName)")
}
print("Title (unloaded): \(portalItem.title)")
}
}
... View more
06-25-2019
11:55 AM
|
0
|
0
|
2294
|
|
POST
|
Thanks Steve. The only thing I would caution against is that the iOS simulator isn't a good test for a number of things, especially where any kind of rendering is concerned. I would recommend testing on an iOS device.
... View more
06-25-2019
10:07 AM
|
0
|
0
|
1205
|
|
POST
|
Could you clarify if you mean the Collector App or the open source Data Collection repo on GitHub? Neither of them do anything special to preload or retain tiles. Are you perhaps comparing raster tiles with vector tiles?
... View more
06-25-2019
09:39 AM
|
0
|
2
|
1205
|
|
POST
|
Hmm. Looks like you're doing the right thing. Can you share the service with us? And which version of the Runtime are you using? Please DM me if you like. It seems we have a bug where if there isn't a serviceURL (e.g. it's a Web Map) then we still return an empty URL, but we should be returning nil. This may be masking something else that's going on.
... View more
06-25-2019
09:37 AM
|
0
|
2
|
2294
|
|
POST
|
And it's a service item? E.g. a Feature Service? You won't get a serviceURL if it's, say, a web map. What do you see if you print the typeName?
... View more
06-25-2019
09:22 AM
|
0
|
4
|
2294
|
|
POST
|
You will need to load the portal item. See the Loadable Resources guide. Try something like this: portalItem.load { (error) in
if let error = error {
print("Error loading portal item: \(error.localizedDescription)")
return
}
print("Service URL: \(portalItem.serviceURL)")
} Are you sure you can read the title? In my testing I am unable to read the title until it's loaded. portalItem.load { (error) in
if let error = error {
print("Error loading portal item: \(error.localizedDescription)")
return
}
print("Title (loaded): \(portalItem.title)")
}
print("Title (unloaded): \(portalItem.title)")
outputs this… Title (unloaded): Title (loaded): Rockingham County Parcels Notice how the unloaded output prints first. The loaded call requires a round-trip to load the metadata from the portal item. Hope this helps. Nick
... View more
06-25-2019
09:08 AM
|
0
|
6
|
2294
|
|
POST
|
I haven't really dug into this, but might the modalPresenter property on the AGSPopupsViewController help out here?
... View more
06-21-2019
12:33 PM
|
0
|
1
|
1419
|
| 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 |