POST
|
The 'm' and 'z' values should be returned automatically if you have `returnGeometry` set to true on the query parameters (true is the default value for returnGeometry). You should also make sure that the feature service you are querying supports `m` and `z` values. For example, this one does not (look for the `hasM` and `hasZ` properties): Layer: Facilities (ID: 0) But this one does have `z` but not `m`: Layer: C2 Military Operations Point (ID: 3) Mark
... View more
06-22-2017
10:51 AM
|
0
|
0
|
357
|
POST
|
Thank you for your question! The `minScore` property on `AGSGeocodeParameters` is for offline geocoding only. For online geocoding, `minScore` has no effect. The default value is 0. A couple of quick tips: The `AGSGeocodeResult` object has a `score` property, so you don't need to access the attributes to get at the score: print("result score = \(result.score)") Also, if you want to filter results based on the minScore, you can do this: let filteredResults = results.filter { $0.score >= params.minScore } I will get the doc updated to avoid future confusion. If you have any more questions, let us know! Mark
... View more
06-14-2017
01:58 PM
|
0
|
1
|
461
|
POST
|
Thank you for your question! The Runtime SDK limits research for "POI" (points of interest) search to 50. For addresses, the limit is 20. You cannot get more results than those. However, there is one property in `AGSGeocodeParameters` that might help you ensure the returned results are relevant: `searchArea` - The search area used to spatially filter the geocoded results. Only results that lie within this area are included. I will push to get the documentation updated for the next release. Thank you again, Mark
... View more
06-08-2017
11:58 AM
|
1
|
0
|
357
|
POST
|
Hello. How are you setting the filter expression on the feature layer in the AGOL map viewer? I have been able to set a filter and have it loaded successfully using the "filter" button on the layer: Once I set a filter, it looks like this: And then how are you creating the AGSMap in your app? I'm using the following code: //filterLayer map: let portal = AGSPortal.arcGISOnline(withLoginRequired: false) let portalItem = AGSPortalItem(portal: portal, itemID: "415658075f2840b89925258867081d90") let map = AGSMap(item:portalItem) self.mapView.map = self.map
... View more
06-08-2017
09:23 AM
|
0
|
1
|
544
|
POST
|
If you need to know when the user is starts or stops navigating on the map with interaction then KVO on this property on AGSMapView (via AGSGeoView): @property (nonatomic, assign, readonly, getter=isNavigating) BOOL navigating; private var myContext = 0 // outside class definition ... mapView.addObserver(self, forKeyPath: "navigating", options: .new, context: &myContext) ... override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { if context == &myContext { if keyPath == "navigating" { print("navigation: \(mapView.isNavigating ? "Started" : "Stopped")") } } else { super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context) } }
... View more
06-07-2017
08:10 AM
|
0
|
0
|
743
|
POST
|
Thank you for your question! Take a look at the AGSGeometryEngine class. That has a method "geometry:containsGeometry", which should do what you want: guard let visibleArea = mapView.visibleArea else { return } guard let graphicCenter = graphic.geometry?.extent.center else { return } let isGraphicInMapView = AGSGeometryEngine.geometry(visibleArea, contains: graphicCenter)
... View more
05-23-2017
01:57 PM
|
1
|
0
|
358
|
POST
|
Thank you for your question! In order to get notified when the map view's visible area changes, you would use the AGSMapView's (through the AGSGeoView base class) `viewpointChangedHandler` property. This bock you set the handler to gets called when the viewpoint of the map view changes. You would then use the `currentViewpoint(with:)` method to get the current viewpoint from which you can get the map view's extent. ``` // set the mapview's viewpointChangedHandler to get notified when the map is panned/zoomed/rotated self.mapView.viewpointChangedHandler = { [weak self] () -> Void in //get the current viewpoint, using the .boundingGeometry type let viewpoint = self?.mapView.currentViewpoint(with: .boundingGeometry) //get the viewpoint's targetGeometry, which in the case of `.boundingGeometry` is an AGSEnvelope let currentExtent = viewpoint?.targetGeometry as? AGSEnvelope print("The visible extent = \(currentExtent)") } ``` Everytime the map is panned/zoomed/rotated, you will get something like this: `The visible extent = Optional(AGSEnvelope: [(-13038516.202202, 4043517.025954), (-13038509.204197, 4043529.473073)], sr: 3857)` Let me know if that doesn't work for you or you need more help.
... View more
04-28-2017
07:43 AM
|
0
|
0
|
385
|
POST
|
Excellent! Let us know if you have any more questions!
... View more
04-14-2017
01:31 PM
|
0
|
0
|
1402
|
POST
|
Brian, Take a look at this GitHub repo: GitHub - mhdostal/HeyWhatsThat: This is an Augmented Reality (AR) app that aims to answer the question, "Hey, what's tha… It is an iOS project, using the ArcGIS RuntimeSDK for iOS, which does what you talk about: overlay a scene view on a live camera and uses the device to control the viewpoint orientation. It was part of a project for the "Esri Runtime Quartz Hack", detailed here: Hey, what's that? | Devpost. Making the UIView underneath the scene view visible is accomplished by setting the alpha value of the scene view to "0.025", via the "View" panel in Interface Builder in the Storyboard containing the scene view. This has the effect of making the scene view totally transparent (or near enough), so you only see the camera image. Hope that helps, Mark
... View more
04-05-2017
02:11 PM
|
1
|
0
|
927
|
POST
|
Marius, Thank you for your question! This is something that we are aware of and are working on. There is a workaround: if you set the size on the AGSPictureMarkerSymbol when you are using your programmatic assets, the size will be consistent on different resolution devices. The problem occurs when you let the size of the symbol be determined by the image; if the image scale is not consistent with the screen scale you run into problems.
... View more
03-23-2017
08:52 AM
|
1
|
1
|
837
|
POST
|
PictureFillSymbol will be added in a future release. You can also take a look at AGSRaster and AGSRaterLayer. The supported image types for those classes are here: ArcGIS Runtime SDK for iOS: AGSRaster Class Reference Note that the Raster classes are in beta in the current release for our mobile platforms (including iOS). To learn more about rasters, you can go here: http://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/what-is-raster-data.htm If your data is not local, you can look for ImageServiceRaster, which is not out yet, but coming soon.
... View more
03-21-2017
01:01 PM
|
0
|
2
|
1402
|
POST
|
If you are not getting calls to your tileRequestHandler, yes, double check your AGSTileInfo and make sure you have created a layer of type AGSImageTiledLayer. There is a AGSServiceImageTiledLayer class has a different handler that is used to provide a URL for a tile. Here is a some sample code which gets a a default AGSTileInfo and extent from one of the standard base maps, then uses that information to create a custom tiled layer. ``` override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. //This will get the default tileInfo; it passes a completion handler //which will create the custom layer and add it as a baseLayer to //a new map. defaultTileInfoWithCompletion { (tileInfo, fullExtent, error) in //make sure we have no error and our tileInfo and fullExtent are OK guard error == nil else { print("defaultTileInfo generated an error: \(error)"); return } guard let tileInfo = tileInfo else { print("tileInfo is nil"); return } guard let fullExtent = fullExtent else { print("fullExtent is nil"); return } //creat the customLayer let customLayer = AGSImageTiledLayer(tileInfo: tileInfo, fullExtent: fullExtent) //Set tileRequestHandler, which gets called when the map needs a tile customLayer.tileRequestHandler = { [weak customLayer] (tileKey: AGSTileKey) in //In this sample, we're just responding with the data for a blue pushpin; for your own tiles, //you would use the information in tileKey to return the correct tile data. let image = UIImage(named: "BluePushpin") customLayer?.respond(with: tileKey, data: UIImagePNGRepresentation(image!), error: nil) } //create a basemap, adding our customLayer as a baseLayer let basemap = AGSBasemap() basemap.baseLayers.add(customLayer) //create the map and load it. You could also set it on a mapView, which would load it for you. let map = AGSMap(basemap: basemap) map.load(completion: { (error) in guard error == nil else { print("Error loading map: \(error)"); return } print("Map is loaded!") }) self.myMap = map } } //This method gets the default tileInfo from a simple basemap //Because loading the baseLayer is asynchronous, a completion handler //is provided; the handler will be called when the baseLayer is loaded // //Clients should create a tileInfo object using one of the AGSTileInfo constructors, //based on your specific tile information. func defaultTileInfoWithCompletion(_ completion: @escaping (_ tileInfo: AGSTileInfo?, _ fullExtent: AGSEnvelope?, _ error: Error?) -> Void) { let basemap = AGSBasemap.lightGrayCanvas() basemap.load { (error) in guard error == nil else { print("basemap failed to load: \(error)"); return } if let baseLayer = basemap.baseLayers[0] as? AGSArcGISTiledLayer { baseLayer.load(completion: { (error) in if error != nil { completion(nil, nil, error) return } let tileInfo = baseLayer.mapServiceInfo?.tileInfo completion(tileInfo, baseLayer.fullExtent, nil) }) } } } ``` Let us know if you're still having problems.
... View more
03-16-2017
03:23 PM
|
2
|
5
|
1401
|
POST
|
Converting to a Swift array is possible, but you'd have to take into account multiple parts with multiple points per part, so you couldn't just do "doodle.parts.array() as? Array". The JSON route is the way to go and is fairly straightforward. Let us know if you have problems or can't get it to work.
... View more
03-10-2017
01:54 PM
|
0
|
0
|
912
|
POST
|
Thank you for your question! You are correct, you will need to serialize and deserialize your AGSPolyline object so you can use it in your dictionary. The AGSPolyline class (and all geometry classes), inherits from the AGSJSONSerializable protocol. You can use the `toJSON` and `fromJSON` methods from that protocol to do what you need: // convert a Polyline to a JSON representation let polylineJSON = (try? polyline.toJSON()) as? NSDictionary // create a new Polyline from JSON let polyline2 = (try? AGSPolygon.fromJSON(polylineJSON!)) as! AGSPolyline
... View more
03-10-2017
01:43 PM
|
2
|
2
|
912
|
POST
|
Thank you for your question! Support for dynamic layer capabilities on the AGSArcGISMapImageLayer is coming with our next release, due in late Q2 2017.
... View more
03-10-2017
08:31 AM
|
0
|
0
|
1401
|
Title | Kudos | Posted |
---|---|---|
2 | 3 weeks ago | |
1 | 05-31-2023 09:26 AM | |
1 | 04-19-2023 08:58 AM | |
1 | 04-07-2023 07:49 AM | |
1 | 03-29-2023 08:01 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|