POST
|
Hello @CristhianSanchez. Please could you DM me with some more details? We'd like to reproduce this and see if we can work out a solution. We'll need some data and a self-contained reproducer project. Thank you!
... View more
08-09-2024
01:13 PM
|
0
|
0
|
235
|
POST
|
Hello. Thanks for the question. At the moment there is a known limitation in ArcGIS Online that prevents the Preplanned Offline Map workflow working with API Keys. Credentials will work, as you've noticed. However, what you're encountering is that the way the SDK is architected, if you set a global API Key on the ArcGISRuntimeEnvironment, then that will be used without even considering any credential you might set. One thing you could try to do is to clear the global API Key before running your code above and then setting it again once the callbacks have completed. That will clear the way for the OfflineMapTask to use the credential you provide. I do want to clarify one thing though. You say "Same thing happens if I have not set the credential above and set the apiKey." Can you confirm that you mean that if you do not set the credential, but do set the apiKey, then the preplannedMapAreas come out as empty? (this is what I would expect) I would like to know if there is a way to set the apiKey locally in a function, instead of globally, so that I can still load the arcgis map with the apiKey Unfortunately not in this case. Typically, anything that implements ApiKeyResource can be provided an explicit API Key to use in preference to any other authentication method (including a global API Key). However, in the case of a Map opening a web map, there are some nuanced reasons that meant we could not expose that functionality in this case, and so the only way to use an API Key to access a web map is to use the global API Key. It's something we plan to review and see if we can improve, but currently that's a known limitation with API Keys and web maps. Alternatively, is there a way of loading an arcgis map without the api key, but using the credentials instead? Absolutely, however if there's a global API Key set, as I mentioned above, that will override any credential in this case. Does this help?
... View more
08-09-2024
01:04 PM
|
0
|
1
|
213
|
POST
|
FYI, there is also this post from a while back which might be of interest. It doesn't quite tackle your specific use case and focuses on Mobile Map Packages from Pro, but it does talk a bit about what's going on within them which could be helpful.
... View more
07-19-2024
06:33 AM
|
0
|
0
|
377
|
POST
|
Hello. I can partially answer the question for you, based off using our hosted basemap tiles (and the Vector Tile Style Editor). When it comes to your own custom basemap service, I'll have to defer to someone else. Let's just talk about our hosted vector basemaps for the moment: There's one set of global vector tiles which we host and for which we provide a number of different styles. And using the Vector Tile Style Editor, you can create your own custom styles to augment those, but all those styles (ours, and anything you create using the VTSE) are bound to the attributes contained in the vector tiles. The Item Resource Cache is a folder of resources (JSON, Sprites, etc.) downloaded from the hosted style, potentially modified to remove web references, and stored on your device. It's not a public spec that we promise to adhere to and should be treated as a black box (though since it's just a folder, you can of course poke around and see what's in there). An Item Resource Cache is, as far as I know, only created one way: by downloading it using the ExportVectorTilesTask to create an ExportVectorTilesJob, just as you suggested. You can either do it by exporting tiles and an item resource cache at the same time, or by just downloading the item resource cache (which sounds more like what you need). That way, you can download multiple different styles to different folders locally, and use them with any exported tiles (VTPKs) from that vector tile service. I've done this a number of times (multiple resource caches, one set of tiles). Note, you can't switch styles on an instantiated ArcGISVectorTileLayer on the fly, but you can create a new layer using the same tiles (VTPK) and a different style (Item Resource Cache), and just swap that out in your Map's operationalLayers or basemap. That should answer Q1. Now, your own services (Q2): If you publish your own basemap service, that's where my understanding falls apart a little. If you wanted to use an Item Resource Cache downloaded from our basemaps or your custom VTSE-created style, I expect your service would need to include attributes included in our service. If you want to publish your own vector tile service with multiple styles, I don't know whether ArcGIS Pro supports publishing different styles for a single vector tile service of your own. I'll see if I can find someone who has some more understanding of that side of things to pipe up. So, for your stated end goal: If you're working with our basemaps as the source, you can absolutely do this and download any number of styles as Item Resource Caches, and any number of map areas as separate VTPKs, and mix and match them as much as you like. The schemas will match. If you're looking for a universal style to apply to any arbitrary vector tile service or VTPK exported from that service, AFAIK that won't work. There's a tight dependency of the style definitions on the attributes published in the service. If you have a single custom vector tile service of your own and you want to apply multiple different styles to it, we'll have to see what someone else says. It expect it would depend on how ArcGIS Pro publishes vector tile services from vector tile layers with differing styles. Hope that helps a bit.
... View more
07-19-2024
06:24 AM
|
0
|
2
|
379
|
POST
|
To open local raster files in the SDK, you'll generally need a couple of support files. A world file to describe the image-to-world transformation, and an aux file to specify a spatial reference, so that the SDK knows how to handle that georeferenced image file. See this gist for an example. The links at the bottom talk about the world and aux files, as well as what to name them. I've found that just using the aux file from the gist wholesale (with an appropriate name) and writing out an appropriate world file based off the instructions in the links, and placing them alongside the image file on device storage works well. This will require a Standard license or above, but if you're using Local Server, you're already there (and of course while you're developing, without applying any license, you can also test this out). You should also be able to use Local Server for serving up rasters, but if you can get the aux and world files working that might be a simpler approach.
... View more
07-15-2024
04:25 PM
|
1
|
0
|
404
|
POST
|
Hello Frank. Thanks for reaching out. Firstly, you will benefit tremendously by using the ArcGIS Maps SDK for Swift over direct REST requests (unless you're just making very simple calls to the ArcGIS Location Platform places or geocoding service). We have numerous tutorials at the SDK's homepage: https://developers.arcgis.com/swift/ I suggest you start with this one, which will introduce you to some concepts around API Keys and the SDK in general: https://developers.arcgis.com/swift/maps-2d/tutorials/display-a-map/ But I also suggest you go through the getting started pages at the SDK homepage. You can also see these blog posts that we wrote around getting started with the SDK, although they will probably be slightly out of date as we just made some major changes to how API Keys are created and managed: https://community.esri.com/t5/arcgis-maps-sdks-native-blog/let-s-build-with-swift-1-maps-and-app-structure/ba-p/1289024 https://community.esri.com/t5/arcgis-maps-sdks-native-blog/let-s-build-with-swift-2-state-and-data-f... https://community.esri.com/t5/arcgis-maps-sdks-native-blog/let-s-build-with-swift-3-swift-concurrenc... https://community.esri.com/t5/arcgis-maps-sdks-native-blog/let-s-build-with-swift-4-view-modifier-an... The new ArcGIS Maps SDK for Swift is the modern continuation of the old ArcGIS Runtime SDK for iOS. Learn more here where we first announced the modernization of our SDKs back in April 2022, and here, where we cover the initial release of the new SDKs later that year. With that in mind, we do indeed discourage use of the old Objective-C ArcGIS Runtime SDK for iOS (which provided UIKit UX components), and although it is a long-term support release, it will eventually cease to receive support. Apple's stated path forward is Swift and Swift UI, and this is what we've committed to with the ArcGIS Maps SDK for Swift. However, Apple provide an easy way to use the Swift UI components with UIKit using a UIHostingController (see Apple's doc here and here), and we have customers who are successfully doing this. As for authentication, you can learn all about using our API Keys and OAuth here: https://developers.arcgis.com/swift/security-and-authentication/ Which one you will use will depend on the type of app you're building and who will be using it. As a general guide, many Esri end users are direct users of the ArcGIS system and have their own logins which enable access to content and services. These customers may well need to use OAuth authentication. But if you are building apps that are to be used by end-users without an ArcGIS login, an API Key is more appropriate. I recommend you create yourself a free ArcGIS Location Platform account which will allow you to create and use API Keys of your own. There are generous free monthly allowances allowing for development and testing, and which can also be used in production. If your customer has given you an API Key, you can certainly use that and it ensures that any usage beyond the free allowance will be billed to them (or just fail if they haven't set up payment methods), but there are a couple of disadvantages to that that I can think of. Firstly, API Keys are scoped, and if you need to provide access to additional services, the customer who hired you will become a bottleneck. Secondly, you won't have insight into usage levels for the API Keys, nor the ability to create additional ones. However, if the API Key is just going to be used for simple stuff like accessing basemaps and performing geocodes or place searches, you might be able to get away with it. More likely though, using your own account during development and testing will work well, and then the customer can provide an API Key for production. I hope that helps.
... View more
07-08-2024
09:17 AM
|
1
|
0
|
484
|
POST
|
Hello. Before I answer your question, I want to make sure we're talking about the right thing… Firstly, named user vs license strings: As you mention, license strings for paid license levels (Basic, Standard, and Advanced) are purchased in packs. But the Lite level license string is free and can be used as much as you like. If the capabilities of your app are all included in the Lite license, that one Lite license string is all you'll need. See here for which capabilities are available at each level. And see here to get your Lite license string. Next, you say "The Named User license with standard privileges, such as VTPK load, seems like a suitable option.". I want to make sure we're talking the same thing here. "Standard" is a license level that, in brief, allows you to open non-Esri-proprietary local data files, like GeoPackages, Shapefiles, ENC, local rasters, etc. (see this link again for full details of what you get at Standard). However, a VTPK is an Esri-proprietary file (like MMPKs, TPKs, TPKXs, etc.) and so can be opened locally at the Lite level. If that's what you need, Standard might be overkill and Lite might suffice. Now, to the question of renewing licenses. License strings can be used in perpetuity. There is no need to "refresh" the license (they are designed to encompass scenarios where a network may never be available). This is true for the free Lite license string, as well as the string(s) you get when you purchase any Basic, Standard, or Advanced deployment pack(s). Named User licenses can be taken offline for 30 days, as you noted. The pattern is this (as described here) : While online, your user signs in. Your code then requests the license from the portal they signed in to. You apply the license in your app, and optionally serialize it to local storage for later use. Whenever your app is subsequently started (probably while offline), you can de-serialize that license and apply it. No network is required. Of course, if you have a network, your user could sign in again (returning to steps 1 and 2). How does the SDK ensure the license reaches its expiry? The encoded license data downloaded in step 2 includes the expiry date, and the SDK compares that to the current date. Whenever you repeat steps 1 and 2, that new license data will effectively have a new 30 day countdown start date encoded in it. I hope that helps.
... View more
06-21-2024
09:04 AM
|
0
|
0
|
259
|
POST
|
Hello. Thanks for the question. This is expected behavior. Loadable is all about metadata, not object state. The Portal's metadata is loaded once from the actual ArcGIS Online or ArcGIS Enterprise portal, and that doesn't change just because you revoke the credentials that provide access to it. There's some great info here about how the Loadable pattern works, and you can see that once a Loadable object reaches loaded state, it'll stay there. Calling load() on a loaded object is essentially a no-op. When you first call load() on the portal, it needs to load metadata about that portal as mentioned above, and since most (all?) of that metadata requires authentication to read, you see the authentication prompt and caching of credentials. I would create a new indentical Portal object and load that. Hope that helps!
... View more
05-22-2024
08:22 AM
|
0
|
0
|
295
|
POST
|
Thanks for that additional info. Yeah. Something is causing the SDK to wait for a while when removing a vector tile layer. iOS doesn't tolerate that happening on the main thread (which makes the app unresponsive), and so is terminating the app. A couple of questions: Which version of the SDK are you on? Are you able to reproduce this yourself? If so, can you share a simple reproducer?
... View more
05-20-2024
02:36 PM
|
0
|
3
|
591
|
POST
|
At first glance it looks like the user is setting a map on the MapView when the MapView already has a map on it (i.e. replace the MapView's map). As part of tearing down the old map, it seems that we're disconnecting from a vector tile service and waiting for it to disconnect in some way. That shouldn't be happening on the main thread (I'm sure we should never call thread.sleep (see frame 3) on the main thread). Presumably setting the map is done as the result of a user action (e.g. tapping a button), but to help dig in: are there more frames after frame 14 in the crash (frames 15 and higher)?
... View more
05-20-2024
01:22 PM
|
0
|
5
|
626
|
POST
|
@NIANXI39If this is still happening, please contact customer service. You should be able to copy and paste your Lite license key from that bit of the web page that you took a screenshot of.
... View more
05-17-2024
10:58 AM
|
0
|
0
|
420
|
POST
|
Not sure why, but remove the default key has resolved the issue If you set a default API Key, it will be used for all requests so even if you configure OAuth, the OAuth/Authentication Manager workflows won't be kicked off. By no longer setting it, the SDK will interrogate services and any auth config you've set up and use that info to manage authentication. If you need API Keys for specific services, you can still set them directly on those SDK objects (just not globally) and use a mix of API Key and OAuth authentication.
... View more
05-07-2024
09:19 AM
|
1
|
0
|
617
|
POST
|
Hello, HTTP caching, while useful for reducing duplicate requests for the same data as you pan and zoom around the map, and for improving performance for the end user, is not designed to take a map offline. It's not that we prevent that from working, but there is a lot of metadata beyond just the raw map content that needs to be cached and returned by the underlying HTTP stack, and you're at the mercy of how the caching works on a particular platform (with the Kotlin SDK, it's OkHttp). Being able to do this is something that's on our radar, but it's a way off yet. The recommended and supported process for taking maps offline is to proactively download them using the OfflineMapTask API. This is a much more deliberate process; web map and data service configuration is required to enable this behavior, and the application needs to expressly make use of APIs to download the map. You can learn more here. Hope this helps!
... View more
05-02-2024
09:04 AM
|
1
|
0
|
259
|
IDEA
|
04-22-2024
07:06 PM
|
0
|
0
|
258
|
IDEA
|
We've released the first public beta of the ArcGIS Maps SDK for Flutter. You can read about it here, and join the beta here. Thanks for all your interest to this point. Please join the beta, give it a whirl, and give us your feedback in the beta forums to help us deliver the best mapping and location SDK for Flutter there is.
... View more
04-22-2024
07:51 AM
|
0
|
0
|
155
|
Title | Kudos | Posted |
---|---|---|
1 | 10-03-2024 04:31 PM | |
2 | 10-03-2024 03:16 PM | |
1 | 10-02-2024 04:25 PM | |
1 | 09-24-2024 08:52 AM | |
1 | 09-16-2024 10:25 AM |