POST
|
As I mentioned in my response to your other question, there are many things to consider when taking data offline. What extent do you need (sounds like you want all of India, but often you only need areas where there is no network coverage for accessing services), what zoom levels do you need (it seems you want all zoom levels), and which basemap (Imagery? Streets?). For your requirements, just downloading the basemap from a service will not be practical, and may not even be possible (a basemap for all of India with full zoom levels will result in a very large file). But there are other ways to get this data, like with a product such as StreetMap Premium. I would suggest you contact your local Esri distributor to discuss options. If you're in India, that would be Esri India: https://www.esri.in/ They will be able to help you determine the best approach for your application, and provide the support you need to implement your solution.
... View more
08-11-2023
07:47 AM
|
0
|
4
|
1713
|
POST
|
You can find an example here: https://developers.arcgis.com/java/sample-code/export-tiles/ In that code, an area of the basemap is downloaded (exported) as a TPK (you can learn more about that here), and used to create a new basemap and a new map. Once it's downloaded to your device, you can just use it whenever you create a new map. If you need more help with this, please ask a new question as requested previously.
... View more
08-08-2023
08:26 AM
|
0
|
1
|
666
|
POST
|
Hi @PRAVEENPATNANA, As Colin mentioned, offline is a complex topic and there are a few ways you approach it. There is a diagram on this page which helps summarize where data comes from for offline work. You're already working with "Data files" with your shape file. What you have noticed is that you will also need to get a basemap to use offline. So far, you have been using our basemap service to use the basemap over the internet. There is no magic button that suddenly makes a basemap work offline. You have to deliberately download it first (either from our basemap service, or from a file you create using ArcGIS Pro). You will need to think about the requirements of your app to decide the best approach. Things to consider are zoom levels and overall extent. A basemap for all of India at all zoom levels will be huge and would take a long time to download. If you don't need to zoom in far, then you could create a basemap that is only used when zoomed out and that could be a lot smaller. Ultimately, you will have to think about how you need to use your data and the basemap offline. This video could also help: https://www.youtube.com/watch?v=VTD2omhGVdI I would also suggest that if you have further questions on this topic that you start a new thread so that other developers can find the discussion more easily (this thread started out as a question about Shapefiles in JavaFX). Hope that helps.
... View more
08-07-2023
10:08 AM
|
0
|
4
|
701
|
POST
|
Declaring map as optional means that it can be nil at some point. Your crash was because by using "!" you had said "I know it will never be nil when I use it", but it turned out it was nil. If you declare it as optional with "?", then Swift will check if the map is nil. You won't get a crash, but your code might be skipped. And you must include logic to acknowledge that it could be nil when you're using it. One common approach is optional binding using an "if let" block. So your code above could be included in an "if let" block: func Load_Municipality_Boundary() {
if let map = map {
self.munFeatureTable = AGSServiceFeatureTable(url: munCensus)
let munFeatureLayer = AGSFeatureLayer(featureTable: self.munFeatureTable)
map.operationalLayers.add(munFeatureLayer)
let censusFeatureTable = AGSServiceFeatureTable(url: URL(string: "https://services.gisqatar.org.qa/server/rest/services/Vector/Census_Municipality/FeatureServer/1")!)
map.tables.addObjects(from: [censusFeatureTable])
mapView.selectionProperties.color = .yellow
self.munFeatureLayer = munFeatureLayer
} else {
print("Map is not set!!")
}
} That "if {}" block will only execute if map is not nil. It's still up to you to make sure the "map" variable is set to an AGSMap instance, or you will see a "Map is not set!!" message written to the console. Optional variables are a fundamental Swift pattern, and not something specific to the ArcGIS Runtime SDK for iOS. I suggest you familiarize yourself with how optional variables are used in Swift. There are many tutorials and articles available online, such as this one. Ultimately though, you need to work out why your app is setting "map" to nil at some point, and make sure that you set the "map" variable to a new AGSMap again before you use it in the above code.
... View more
08-01-2023
08:07 AM
|
0
|
0
|
1443
|
POST
|
Beware the exclamation mark. This code is dangerous: var map: AGSMap! Declaring map as an implicitly unwrapped optional is stating that even though the variable is optional and can be nil, that you KNOW that whenever you access it, it will not be nil. Unfortunately, in your app, that's not the case. When you click "Maps" a second time and SetMapExtent() is called, the map variable above is nil. Make sure that it isn't and your code will get a bit further. But I would recommend not declaring it as an implicitly unwrapped optional in the first place. func SetMapExtent () {
let envelope = AGSEnvelope (xMin:216985.909, yMin:375531.776, xMax:241940.565, yMax:415497.915, spatialReference: self.mapView.spatialReference)
self.map.initialViewpoint = AGSViewpoint(targetExtent: envelope)
self.mapView.map = map
} However, self.mapView.spatialReference is also nil, so the envelope you create will have a nil spatial reference. That will also probably cause problems.
... View more
07-27-2023
06:57 AM
|
0
|
1
|
1475
|
POST
|
Hi. It looks like you've answered this yourself already. See your other question. The first place to look for samples in our samples app. Here's a KML sample, which you might already have found.
... View more
07-24-2023
09:49 AM
|
0
|
0
|
425
|
POST
|
Hello. You need a Standard license to access KML files stored locally on your device (see the licensing documentation). It looks like you have applied a license, but it is not a Standard license. Note that during development and testing (by not applying a license) you can test using a local KML file, but your app will have a watermark and you cannot deploy to production. Also note that KML accessed via the web (e.g. via https) can be used with a Lite license. Hope that helps.
... View more
07-24-2023
09:41 AM
|
0
|
0
|
470
|
POST
|
Your routeTask instance is being deallocated before the call can complete. Create an object level variable to hold on to the instance. See this sample code. Things like this are avoided with Swift Concurrency. You could use this library, which adds Swift Concurrency to most of the ArcGIS Runtime SDK for iOS (here's what solving a route looks like). Alternatively, its successor (ArcGIS Maps SDK for Swift) supports Swift Concurrency out of the box.
... View more
06-28-2023
06:39 AM
|
1
|
0
|
455
|
POST
|
Hello, At present there isn't anything built in to the SDK for clustering. The 100.x ArcGIS Runtime SDK for iOS will not receive any further new features, just bug fixes, but clustering is on the roadmap for the Swift SDK and we aim to have something released by the end of the year. In the meantime, you could look at this plugin, in particular this branch that works with the 100.x ArcGIS Runtime SDK for iOS. Please note, this is not a supported product, but if you need clustering now, it could provide a way forward.
... View more
06-20-2023
12:28 PM
|
0
|
0
|
465
|
POST
|
Hi, There are a few things that could be going on: Are the spatial references of the TPKs the same? The Runtime SDKs do not reproject tiled layers, so they need to match the spatial reference of the map (which is derived from the spatial reference of the Basemap if there is one), otherwise they will not display. One other thing to look at: the initialViewpoint is a state property on the Map. It's used by the MapView to know how to initially display the map. After that, as you display the map and use it, you set the viewpoint by calling one of the setViewpoint methods on MapView. So, if TPK 2 has the same spatial reference as TPK 1, and you use the MapView.setViewpointGeometryAsync() method to the envelope of the second layer, the Map View should zoom to the 2nd TPK. You will of course need to set the layer for TPK 2 to visible.
... View more
06-09-2023
11:24 AM
|
0
|
0
|
382
|
POST
|
Hi. How are you creating the FeatureCollectionTable? When you create it, you need to specify the fields you expect it to store on all features. If you didn't specify a "title" field, then it won't be part of the created feature. A FeatureCollectionTable has a defined schema that determines the geometry type and attributes (fields) that can be stored for any Feature. Fields can be optional (nullable), of course. See the FeatureCollectionTable constructor, and Field class.
... View more
05-31-2023
11:55 AM
|
0
|
0
|
831
|
POST
|
Hi @GBreen, I'm afraid that you cannot identify on an ArcGISVectorTiledLayer at this time, whether using a Vector Tiled Service, or a VTPK. You won't get any results back for the layer in the identify results. This is something that we are looking at, but currently do not support. Part of the reason is that our basemaps are primarily for visual reference so have very little attribution baked in. Adding attribution would add bloat to the PBF data that is returned. However, if you are working with your own vector tiled layers then one pattern is to have a separate "companion" feature layer that reflects the real-world objects in your vector tiled layer, and identify or query against that feature layer. Sorry it's not the answer you want, but I hope that helps. Nick.
... View more
04-26-2023
03:11 PM
|
0
|
0
|
810
|
BLOG
|
The 200.1 release of the ArcGIS Maps SDKs for Native Apps has just gone live. Notably, this includes the first production ready releases of the ArcGIS Maps SDK for Swift and the ArcGIS Maps SDK for Kotlin. 200.1 also introduces Dynamic Entities, an important new capability that the team has been hard at work on for some time. Check out the ArcGIS Blog post for more details.
... View more
04-19-2023
10:46 AM
|
1
|
0
|
363
|
POST
|
Hi there. The answer for the Kotlin SDK is the same as that for your question about the Swift SDK here. 200.1 of the Kotlin SDK will be production ready, and we're anticipating a release next week. Hope this helps!
... View more
04-14-2023
09:27 AM
|
1
|
0
|
338
|
POST
|
I'll just add a note to Nimesh's reply to address your second question about major changes. There are a number of improvements we've made since the 200.0 beta to make the SDK feel even more natural to a Swift developer. Those changes will be described in the 200.1 release notes. The 100.15 release will receive bug fixes and 3rd party vulnerability fixes, but no new functionality. So if you're starting afresh, the recommendation is definitely to go with the Swift SDK.
... View more
04-14-2023
09:15 AM
|
1
|
0
|
840
|
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 |