|
POST
|
Thank you for your question! I tried the code you posted above and it worked for me using my sample data. One thing to note is that when using the "mapView.setViewpointCenter" method, the map will only recenter itself at the given geometry. If you also want to zoom, you will need to use the "mapView.setViewpointCenter:scale:completion:" method with an appropriate scale. For example: mapView.setViewpointCenter(features[0].geometry! as! AGSPoint, scale: 10000, completion: nil) I would quickly check and make sure you're not getting any errors and at least one feature back from the query. If you're still having problems, let me know, Mark
... View more
07-13-2017
02:22 PM
|
0
|
0
|
641
|
|
POST
|
Thanks for your question! The FeatureLayer "definitionExpression" property is simply a SQL Where clause. So in your example, you would need to use "OR" instead of "||" for it to be valid SQL. For example: fl.definitionExpression = "Name = 'Kimi' OR Name = 'Sebastian'" So as long as your feature layer has a field named "Name" which contains features with those exact names, you should be good. Let me know if you have any problems, Mark
... View more
07-13-2017
02:04 PM
|
0
|
0
|
733
|
|
POST
|
Thank you for your question! A FeatureLayer has a "mode" property which specifies how the layer retrieves features from the service. It is detailed here: 10.2.5: AGSFeatureLayer Class Reference For your case, you can set the mode to "AGSFeatureLayerModeSnapshot": In Snapshot mode, the feature layer retrieves all of the features from the associated layer resource and displays them as graphics. This includes all features that satisfy the definitionExpression and defaultDefinitionExpression. Note that the number of features that are retrieved will be limited based on the ArcGIS Server's configuration (500 features by default for ArcGIS Server 9.3, and 1000 for ArcGIS Server 10). It will be less efficient, because it will retrieve all the features (up to the server limit) instead of only those needed to be displayed, as in the "OnDemand" mode, but it should allow you to get the full extent of all the features retrieved. Let me know if you have more questions, Mark
... View more
07-13-2017
01:25 PM
|
2
|
1
|
886
|
|
POST
|
Thank you for your question! While we don't have anything specific to "pulse" graphics in the API, you can accomplish this by setting up your own timer and changing one or more graphicsOverlay, graphics, or symbol properties when the timer fires. Below are two examples: the first one changes the opacity of the graphics overlay containing the graphic to pulse; the second one changes the size of the symbol associated with the graphic. The code to create the timer is as follows: var timer = Timer() ... timer = Timer.scheduledTimer(timeInterval: 0.02, target:self, selector: #selector(pulseGraphic), userInfo: nil, repeats: true) And the "pulseGraphic" method to adjust the overlay opacity: var opacity: Float = 0.0 var goingDown: Bool = true func pulseGraphic() { opacity = opacity + (goingDown ? -0.01 : 0.01) if opacity < 0.25 { goingDown = false } else if opacity > 1.0 { goingDown = true } else { animationGraphicsOverlay.opacity = opacity } } Hope that helps. If you have further questions, let me know. Mark
... View more
07-11-2017
09:07 AM
|
2
|
4
|
1593
|
|
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
|
617
|
|
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
|
795
|
|
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
|
579
|
|
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
|
898
|
|
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
|
1193
|
|
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
|
570
|
|
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
|
584
|
|
POST
|
Excellent! Let us know if you have any more questions!
... View more
04-14-2017
01:31 PM
|
0
|
0
|
2308
|
|
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
|
1482
|
|
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
|
1425
|
|
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
|
2308
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-30-2025 09:41 AM | |
| 2 | 11-25-2024 01:58 PM | |
| 2 | 08-19-2024 02:33 PM | |
| 1 | 05-31-2023 09:26 AM | |
| 1 | 04-19-2023 08:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-18-2025
09:06 AM
|