|
POST
|
Do you need to perform some action when the user taps while the map is animating to its new rotation, or do you just need to ensure the tap does not stop the rotation?
... View more
12-21-2018
10:30 AM
|
0
|
2
|
1475
|
|
POST
|
If you respond with YES to didTouchDownAtScreenPoint, you are telling the Runtime that you want to handle the entire tap or drag gesture and so Runtime will not make the map track your finger around the screen. You will then receive didTouchDragToScreenPoint delegate events until the drag gesture completes with a single didTouchUpAtScreenPoint event. If you respond with NO to didTouchDownAtScreenPoint (or don't implement the delegate method) then Runtime will handle a drag and move the map to accompany the drag gesture, or handle a tap via the didTapAtScreenPoint. If you just want to detect taps on the map, simply implement the didTapAtScreenPoint delegate method and don't implement didTouchDownAtScreenPoint (or implement it to return NO), didTouchDragToScreenPoint and didTouchUpAtScreenPoint. Let me know if that helps.
... View more
12-19-2018
05:46 AM
|
0
|
4
|
1475
|
|
POST
|
Ah. Most likely featureTable is not loaded. Try something like this: featureTable.load { [weak self] error in
guard error == nil else {
print("Error loading feature table! \(error!.localizedDescription)")
return
}
guard let self = self else { return }
let geom = AGSPointMakeWGS84(40.7128, -74.0060)
let attr = ["Name":"a","Type":"b"]
let feature = self.featureTable.createFeature(attributes: attr, geometry: geom)
self.featureTable.add(feature) { error in
guard error == nil else {
print("Error adding the feature! \(error!.localizedDescription)")
return
}
print("Feature added OK")
}
}
Depending on your app, you could load the layer once up front and enable the UI once it's loaded, or you could follow this pattern each time (if an AGSLoadable object is already loaded, calls to load return immediately).
... View more
12-17-2018
04:04 PM
|
2
|
1
|
1010
|
|
POST
|
Yes. You do not need a map to edit (or even read/query) data. Simply create an AGSServiceFeatureTable that points at your ArcGIS Online layer. You can then follow the pattern described in the Add Features sample. There's no need to create an AGSFeatureLayer from the table to add to a map. Let me know how that works.
... View more
12-17-2018
02:23 PM
|
0
|
3
|
1010
|
|
POST
|
Hi Michael Mueller, One thing to bear in mind is that you need the baseLayer to load before you can read the fullExtent property. You also don't need to construct a new AGSEnvelope from the one you've already got hold of. Simply pass that into the AGSViewpoint constructor. Something like this might be more robust: baseLayer.load() { error in
guard error == nil else {
print("Error loading vector tile layer: \(error!.localizedDescription)")
return
}
if let extent = baseLayer.fullExtent {
map.initialViewpoint = AGSViewpoint(targetExtent: extent)
// Or if the map has already been opened into a mapView
// in which case the mapView may already have read the
// map's "initialViewpoint" property…
// mapView.setViewpoint(AGSViewpoint(targetExtent: extent))
}
}
Cheers, Nick.
... View more
12-17-2018
02:09 PM
|
0
|
0
|
1073
|
|
BLOG
|
Ah. Actually I see that this could be a Maps App issue and that you must have modified the project to use Cocoapods. Please open an issue on the repo and describe in better detail how you've modified the project to use Cocoapods and some more detail about the crash (e.g. stack trace).
... View more
11-07-2018
07:19 AM
|
0
|
0
|
1592
|
|
BLOG
|
This project doesn't use Cocoapods. If this is a general question about Cocoapods and the iOS Runtime SDK, please post the question at here. But this suggestion might be helpful in case your Cocoapods cache has got confused.
... View more
11-07-2018
07:12 AM
|
0
|
0
|
1592
|
|
POST
|
Have you tried setting the AGSArcGISTiledLayer.noDataTileBehavior to .upSample?
... View more
11-01-2018
10:29 AM
|
0
|
0
|
5054
|
|
POST
|
The problem you're seeing is that each AGSArcGISFeature is going out of scope and being deallocated before the async fetchAttachments call is completing. You could try something like this, which uses Swift closure captures to hold a reference to a feature until the fetchAttachments call has completed. func getAttachments() {
let params = AGSQueryParameters()
params.whereClause = "1=1"
table.queryFeatures(with: params, queryFeatureFields: .loadAll) { (results, error) in
guard error == nil else {
print("Error querying features: \(error!.localizedDescription)")
return
}
guard let featureEnumerator = results?.featureEnumerator() else { return }
// Create a Set to store feature references
var featuresHavingAttachmentsFetched = Set<AGSArcGISFeature>()
var i = 0
for result in featureEnumerator {
guard let feature = result as? AGSArcGISFeature else { continue }
// Store the feature reference in the set
featuresHavingAttachmentsFetched.insert(feature)
print("Getting attachments for feature \(i).")
// Call fetch attachments, but also capture `feature` so that it can be removed from the
// set maintaining the reference to it once the attachment fetch completes.
feature.fetchAttachments() { [feature, i] (attachments, error) in
defer {
// Remove the feature reference when this fetchAttachments callback block exits.
// We've held on to it long enough now and don't need it any more.
featuresHavingAttachmentsFetched.remove(feature)
}
guard error == nil else {
print("Error getting attachments for feature \(i): \(error!.localizedDescription)")
return
}
print("Got \(attachments?.count ?? 0) attachments for feature \(i).")
}
i += 1
}
}
}
Cheers, Nick.
... View more
11-01-2018
10:11 AM
|
0
|
0
|
834
|
|
POST
|
Hi Kareem Badr, You should find what you're looking for in the AGSArcGISMapImageLayer. Cheers, Nick.
... View more
10-31-2018
11:53 AM
|
2
|
1
|
1193
|
|
POST
|
Our routing and geocoding services don't support exporting for offline use. One option is to use Streetmap Premium for ArcGIS Runtime. That provides an MMPK with network model and geocoders included. You can download and use these for free during development, but they do incur a deployment cost for production use. Cheers, Nick.
... View more
10-30-2018
10:50 AM
|
2
|
2
|
1859
|
|
POST
|
Hi there. There is no clustering capability in the Runtime yet. We have discussed Clustering and it's on a list of future enhancements, but not scheduled for any release yet (I can pretty confidently say it won't be included in 2019). And unfortunately I haven't had time to update that repo to Runtime 100. I've had a couple of requests, but it's quite a bit of reworking to get it done and I just haven't had the time yet. I could help point you in the right direction if you wanted to take it on - I've had some thoughts about how it should be updated. Cheers, Nick
... View more
10-24-2018
06:48 PM
|
0
|
0
|
802
|
|
POST
|
Appreciate your patience Michael Hamsa, My reply above still stands: we're gunning for the next release of Runtime, in Q1/Q2 timeframe next year. Cheers, Nick.
... View more
10-18-2018
02:26 PM
|
0
|
5
|
2841
|
|
POST
|
Hey Michael Hamsa, I don't think we support that workaround for text. The examples I've seen have different layers for labeling defined at different scale ranges. Sorry I don't have a better answer for you! Nick
... View more
10-14-2018
11:39 AM
|
0
|
7
|
2841
|
|
POST
|
Hey Manasa Parida, I wonder if there's some confusion about the purpose of the Maps App here? The Runtime SDK does not offer a navigation experience (just a routing experience, i.e. we can get you directions, but you have to get yourself to your destination) and does not track you along a route that you've got planned. The Maps App doesn't add anything to that, so the fact that your location has deviated from the route, as in the screenshots above, is expected. You would need to add additional logic to your app if you want the location snapped to the route task result. One approach might be to write your own AGSLocationDataSource that you pass a route task result to and as your data source reads updated locations from Core Location, your custom data source snaps the results to the current route, returning those to the AGSLocationDisplay. That way the map view will show you on the route if you're nearby. I hope I've understood your question properly. I think the crux of it is that there's no relationship between the route task result that you're displaying and the device's displayed location, and that is as designed. Nick.
... View more
10-14-2018
11:27 AM
|
0
|
4
|
2667
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Thursday | |
| 2 | 3 weeks ago | |
| 4 | 4 weeks ago | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |