|
POST
|
I assume you used ArcGIS Pro to create your mobile map package? I'd need more detail before I can help, but some things to consider: It sounds like you are after imagery. Vector Tile basemaps consume much less space in general for the same amount of detail, especially over large geographic areas. Could that work for you, or do you need imagery? With respect to "global coverage": Consider the nature of your app. Do you need to provide one offline map for the whole world at once, or do you merely need to provide smaller offline maps, but potentially anywhere around the globe? How large a map package is acceptable to your app and your users? Are your users ArcGIS users who could potentially generate their own offline maps?
... View more
07-06-2020
07:50 AM
|
0
|
1
|
1788
|
|
POST
|
Hi there. Thanks for sharing the feature service. It turns out that this isn't very much data at all (I had imagined you had thousands of trails across a whole country/continent). Looks like the biggest trail only has 50ish features. This is not a lot at all. See the graph here. Perhaps the easiest way to do this, since you are also going to build a web component around it, is to create a layer in ArcGIS Online that uses that service, style it, and reference that in both your web map and the iOS app. Something like this: From the Open Data URL you provide above, get the API URL: https://maps.oakville.ca/oakgis//rest/services/ArcGISOnline/AGO_Oakville_Misc_Layers/MapServer/0 Sign in to ArcGIS Online and open a new map: https://www.arcgis.com/home/webmap/viewer.html?useExisting=0 Add Data (Add Layer from Web) and provide the API URL. Change the style of the new layer… …to style by Trail Network. You can explore the OPTIONS panel to change the symbols some more. Save the styled layer This will create a new layer item in your ArcGIS Online account which references the Oakville GIS server. Go to the new layer's details page and get its ID from the URL… I also shared the new layer item publicly at this point so my iOS app wouldn't have to deal with authentication. This may or may not be what you want to do. Use the Item ID from step 6 to open the layer in your iOS app. The Runtime will read the styles you defined in the map. If you later update the layer and save it, your iOS app reflect that update: import UIKit
import ArcGIS
class ViewController: UIViewController {
@IBOutlet weak var mapView: AGSMapView!
let featureLayer: AGSFeatureLayer = {
let savedLayerItem = AGSPortalItem(portal: AGSPortal.arcGISOnline(withLoginRequired: false),
itemID: "6d3278ab3dcf4fa28bef288fd19ddc04")
let layer = AGSFeatureLayer(item: savedLayerItem, layerID: 0)
layer.definitionExpression = "TRAILNETWORK <> 'NULL'"
return layer
}()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let map = AGSMap(basemapType: .lightGrayCanvasVector,
latitude: 43.46090487171449,
longitude: -79.71849182158695,
levelOfDetail: 12)
map.operationalLayers.add(featureLayer)
mapView.map = map
}
} Note that in the code above, I use the definitionExpression I mentioned in my previous email to filter the features returned for the feature layer. There is not a lot of data in this layer once you filter out the non-trail records. You can use this same layer in your web app and in the iOS app if you need, or create one for each. In this workflow, you're still leaning on the source data API. If Oakville's servers get slammed, you might consider downloading the Shapefile of the data and uploading that to ArcGIS Online to host your own copy of the data in our cloud. These doc links might help: Style categories (unique values, step 4 above) Share items (I ignored security in the code above by sharing my layer publicly) Copy and save layers (step 5) If you need to host it in ArcGIS Online: Publish hosted feature layers (and manage them) Hope this helps. With this data you shouldn't need to do anything special from the iOS side of things. My only concern would be whether the Oakville GIS server has good enough uptime. Probably, but if not, just upload to ArcGIS Online and keep your service updated as they publish new data. Hope this helps. Nick.
... View more
06-17-2020
07:26 PM
|
2
|
1
|
3619
|
|
POST
|
Hi Eliasz K, I'm not sure what your hint is for other developers: there is no need to remove token authentication. Runtime 100.x handles token authentication for all the layer types you list in your original post and, as Xueming mentioned, if this isn't working then we would like to understand why and help you get it working. Could you share the information she asked for in her reply above? If there's a bug, we need to fix it. If there's a nuance about how you're approaching authentication that is tripping up the Runtime, then we need to understand if we can improve some documentation and get you on your way. Let us know! Nick.
... View more
06-16-2020
04:56 PM
|
0
|
0
|
3781
|
|
POST
|
Hi. There appear to be a lot of questions here, only some of which are relevant to the Runtime SDK for iOS. But I'll try to provide some guidance… Firstly, can you explain what you mean by the "iOS SDK filter functions"? Are you referring to definitionExpression? Typically, you might draw a set of data in different colors by using an AGSUniqueValueRenderer, but that might only work if you are not displaying a huge number of trails at a time. See this sample. Which leads to my second question. How are you displaying these trails? Will you zoom out to display hundreds of trails at a national level, or do you focus in on specific trails or areas with just a small set of trails visible at any one time? In the latter case (i.e. you have a set of trails that you know you will be working with), you could set the AGSServiceFeatureTable's featureRequestMode to manualCache. You would then populate the local in-memory AGSServiceFeatureTable using populateFromServiceWithParameters() and set an appropriate whereClause on the AGSQueryParameters. This will make the network request once, and then display the features from memory. As you zoom and pan around, your app won't make network requests to refresh or reload the data. Other featureRequestModes might end up displaying from memory, but features are not aggressively cached so panning and zooming is likely to result in repeat requests (see the bufferFactor property for some control). This way, you have complete control over when the features are retrieved from the service. Setting the featureRequestMode to manualCache and calling populate with a whereClause is fundamentally very similar to using definitionExpression with the default featureRequestMode, except that you have total control over how long features are cached locally and when network requests are made. As for your other questions: I'm not sure what you mean by "ASP.Net Core webapp". You can create Feature Layer Views of a hosted feature service. I do not know how you would create and manage those remotely and it doesn't sound like it would solve your issue. The best way to deal with large data sets depends on a lot of variables to do with the data - these considerations will have an impact on how you might publish your data and how you might access it (e.g. the populate approach above): Will you need to see it all at once when zoomed out? If so, you could publish the feature layer to a tiled image service and display the tiles when zoomed out. Will you be editing it? If not, you could publish a separate generalized layer for use when zoomed out. How reliable is your network connection? If it's slow or variable, you could consider the populate approach above or you might consider generating a Mobile Map Package with ArcGIS Pro and using that. Hope some of this helps, but I'd need to understand more about what you're trying to achieve.
... View more
06-16-2020
04:38 PM
|
2
|
3
|
3619
|
|
POST
|
WRT the performance difference, is the data being packaged into the MPKX or might it still be being referenced in the source enterprise geodatabase? If it is being packaged, if you query again is it quicker (I wonder if Local Server is unpacking the MPKX and that is contributing to that 27.11 seconds)? If not, Michael Branscomb might have some more thoughts.
... View more
06-11-2020
10:13 AM
|
0
|
1
|
3168
|
|
POST
|
Hi Eric. 1. Excellent. Thanks for confirming. 2. Interesting. TBH I don't have much experience with Local Server, but I'll raise this with the team to see if this is expected. It could be something to do with how the data in the MPKX is indexed? 3. For Runtime: any editing (except of completely public, unsecured data) requires Basic or higher. If you are not editing, you can use Lite. To create and manage the web map (supporting editing or not): you will need a suitable ArcGIS Online user account type (Creator or GIS Professional can create web maps). Hope that helps. Nick.
... View more
06-11-2020
08:39 AM
|
0
|
0
|
3168
|
|
POST
|
Hi. Some thoughts, and a third option that could possibly help: MMPKs can be used by all Runtime SDKs whereas MPKX and Local Server are suitable for targeting Desktop apps built with Runtime since it relies on Local Server and Local Server only supports Windows and Linux on Desktop. If that's what you're targeting, great, but I wanted to make sure you were aware of this depending on what you were planning on targeting. When you use an MPKX it's going through Local Server, so I'm not surprised you see a bit of a performance boost using MMPKs where you're working directly against the file system. I wouldn't expect it to be huge to be honest, but there is always some overhead with hitting the Local Server. You might consider the Preplanned Offline Map workflow. Whereas MMPKs are created by our Desktop tools and can be deployed to devices (hence no editing - there isn't a pathway to process edits back to the data sources), the Preplanned Offline Map workflow allows you to work with a web map and hosted data and download that to your device as an offline map. This supports editing since the downloaded data is associated with data services. When you need to, and you have a network connection, you can sync edits on a device with the hosted data service(s). High level, you author a web map with data layers, determine one or more areas of the web map to be packaged up once, and many devices can then download and use that. The preplanned workflow is pretty powerful because it's supported by ArcGIS Online (Enterprise not required), it supports editing, and it is scalable. You can find out more about your options in these technical sessions: Working with maps online and offline Editing your data online and offline Optimizing your data workflows for working offline Hope this helps. Nick.
... View more
06-10-2020
12:17 PM
|
0
|
5
|
3168
|
|
POST
|
Hi Eric. You can use an MMPK with the Runtime with a Lite license. If your MMPK includes a locator or network datasets, you can also geocode and route using a Lite license, but note that if you want to use the Navigation API, that's enabled at the Basic license level. Joe's comment about Standard licenses is understandable. You need Standard for local data files like Shapefiles, GeoPackages, local rasters, etc.. The distinction is subtle and I'll see if we can improve the text, but the Lite description here includes this text: Viewing maps, scenes, layers, and packages from the ArcGIS platform. An MMPK is considered a package from the ArcGIS platform. Hope this helps. Nick.
... View more
06-04-2020
08:57 AM
|
0
|
0
|
2326
|
|
POST
|
Thanks for the extra info, Aaron. Yeah, that sounds like it could work. You could serialize the job too, and offer the user the option to try downloading the job's geodatabase in a few minutes if they know they'll have network later. There are obviously many approaches you could take depending on the user experience you want to provide and how much effort you'd want to put in to automatically detect reachability. Also, I'm sure you've seen this, but this library seems to do the heavy lifting for you.
... View more
06-03-2020
01:47 PM
|
0
|
1
|
3162
|
|
POST
|
Hey Aaron. So there are a couple of things going on here: What the server is doing for the Job. How the Runtime checks in on that. When the generate geodatabase job is started in the Runtime, it kicks off a process on the server. Runtime then polls it periodically. We're resilient to (i.e. ignore) network failures because networks could come and go while the service continues to prepare the geodatabase for download and it would be bad to fail the whole job just because we couldn't get through once or twice. If we haven't had a successful connection to the server in 10 minutes though, that's when we'll fail the job. You can see this documented here: Additionally, jobs using services are designed to handle situations where network connectivity is temporarily lost without needing to be immediately paused. A started job will ignore errors such as network errors for a period of up to 10 minutes. If errors continue for longer, the job will fail and the message will indicate the loss of network connection. If the Job can get through to the service to check on the job, that 10 minute timer is reset, so it's 10 minutes from the last successful connection. If you know these calls will fail for 10 minutes, Runtime provides a way to work with Jobs to do provide a good experience. Assuming you have some notification of network reachability available to you, a Job has a pause() method. This doesn't actually pause the server-side work, but pauses the client-side polling of the server. You could pause the job when you notice network reachability is gone, and call start() on the job to resume it when it is back. I'm checking with the team to find out whether the 10 minute countdown since the last successful connection includes paused time. A job can also be serialized/deserialized. It's often helpful to make use of that. If you have a serialized copy of the uncompleted/not-failed job, you can later deserialize it and call start() and it will check in with the server and see where to pick up from. Often that will mean polling the server, finding out that while you were gone the job completed, and jumping straight to the download phase. You could for example, serialize the job and start it again from that serialized state after the 10 minute failure. This is also covered at the above doc link: To deal with partially-connected workflows, you can serialize and pause a job when your app detects that network connectivity has been lost for a few minutes to avoid job failure purely due to this lack of network connectivity (as failed jobs cannot be restarted). The job can then be deserialized and resumed when connectivity is reinstated. The iOS Toolkit has a JobManager component that handles all this for you. We don't have a timeframe for the Android Toolkit to get this, but perhaps the iOS one can help you understand some patterns. So, in short: Yes, you should ideally track network reachability. You can pause and restart the job based off that. When you pause, grab a serialized copy of the job. This will be helpful to reconnect to the server's job processing if you hit the 10 minute timer limit on your job object. If a job failed because it could not connect to the server to get status for 10 minutes, you can create a new job from the serialized version and call start() to reconnect to that job on the server. Does this help? Nick.
... View more
06-03-2020
12:27 PM
|
1
|
4
|
3162
|
|
POST
|
You can safely ignore the exception. It doesn't propagate up out of the Runtime, it's merely logged to the console (I suspect we should hide that logging - I'll raise this with the team). The result you get back from the fieldForName() call is still nil, right? If Xcode is stopping, you should remove any breakpoints on C++ exceptions. Does that help? Nick.
... View more
06-02-2020
09:34 AM
|
1
|
1
|
1349
|
|
POST
|
Thanks for sharing your MMPK. That helped. Your map has a spatial reference of WGS 84. Your solution is to do this: Go to this page and pick a WGS84 basemap. On the Basemap's item page, pick out the GUID from the URL (e.g. 02b1f120c3674bfe896ac81731be1739 for https://www.arcgis.com/home/item.html?id=02b1f120c3674bfe896ac81731be1739 ) Create a Basemap from a Portal Item using that ID with code like this, setting it on the map from the MMPK, then setting the map on the map view: try
{
MobileMapPackage myMapPackage = await MobileMapPackage.OpenAsync("");
if (myMapPackage.LoadStatus != LoadStatus.Loaded && myMapPackage.LoadError != null)
{
//TODO
}
ArcGISPortal arcGISPortal = await ArcGISPortal.CreateAsync();
PortalItem portalItem = await PortalItem.CreateAsync(arcGISPortal, "02b1f120c3674bfe896ac81731be1739");
Basemap basemap = new Basemap(portalItem);
Map map = myMapPackage.Maps.First();
map.LoadStatusChanged += Map_LoadStatusChanged;
map.Basemap = basemap;
MyMapView.Map = map;
}
catch (Exception) { throw; } Our default basemaps that you create from our Basemap factory methods are spatial reference Web Mercator. The map that is obtained from the MMPK already has its spatial reference set (which I did not expect, but it turns out that's the case with maps from an MMPK). Hope this helps (thanks Michael Branscomb for the .NET code!)
... View more
05-26-2020
05:43 PM
|
0
|
1
|
2324
|
|
POST
|
Hi. Sorry you're having problems here. Looks like something we'll have to look into. In the meantime, have you considered creating a new GraphicsOverlay when the zoom level changes? Seems like right now you're manipulating the existing graphics in a single GraphicsOverlay to come up with a new collection when the zoom level changes. If instead you come up with the new set of representative graphics and place them in a new GraphicsOverlay and remove the one being used for the previous zoom level, does this remove the stuck artifact? You should of course be able to use a single graphics overlay and not have to swap them out, but I wonder if this can help you in the meantime. And GraphicsOverlays are not very heavyweight so this workaround shouldn't impose a performance hit. One other thought: have you tried explicitly deselecting the selected graphic before it's removed? Cheers, Nick. P.S. This won't necessarily help, but just for reference here's a cluster layer I built for iOS. It uses a FeatureCollectionLayer instead of Graphics in a GraphicsOverlay, which means you can put your layer anywhere in the operational layer stack: clusterlayer-plugin-ios
... View more
05-26-2020
11:20 AM
|
0
|
1
|
4582
|
|
POST
|
Hi Everett. One other thing you could try is the WebTiledLayer. This allows you to use image tiles from non-ArcGIS services if you happen to have a basemap elsewhere that does work for you. Cheers, Nick.
... View more
05-26-2020
08:14 AM
|
0
|
0
|
5511
|
|
POST
|
Hi. You could do one of 2 things: 1. If it's GeoJSON you could upload it to create a new feature service in ArcGIS Online. See this document. This will give you a feature service with a single layer in it. That layer will have a URL that you can use with a ServiceFeatureTable (as above). 2. You could parse the JSON to create a FeatureCollection. See this tutorial. In short, you can definitely parse it or import it, depending on the data format. Hope that helps.
... View more
05-22-2020
01:54 PM
|
2
|
1
|
1134
|
| 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 |