|
POST
|
Looks like the crash happened in Thread 10. Can you provide the stack for that thread please?
... View more
12-13-2017
10:01 AM
|
0
|
0
|
2408
|
|
POST
|
You might try moving your ~/.cocoapods folder out of the way in case it's confused/corrupted by the Cocoapods version update, and doing a fresh "pod install".
... View more
12-04-2017
01:51 PM
|
0
|
0
|
2371
|
|
POST
|
You should use the "rotateEnabled" property of the AGSMapView's "interactionOptions". Seems the Guide documentation is out of date. We'll get it updated. Hope that helps. Nick.
... View more
11-30-2017
04:41 PM
|
0
|
1
|
1818
|
|
POST
|
Have you tried "pod repo update --verbose" to update your local cocoapods repo cache? Failing that, you could try to manually delete the cache folder in ~/Library/Caches/CocoaPods
... View more
11-30-2017
10:02 AM
|
0
|
3
|
2371
|
|
POST
|
Hi, Assuming you have a reference to the AGSMapView named mapView, then if you're using Runtime 100.x, you can use KVO on the map's mapScale property, like this: override func viewDidLoad() {
super.viewDidLoad()
mapView.addObserver(self, forKeyPath: "mapScale", options: [.new, .old], context: nil)
}
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
if let mapViewThatChanged = object as? AGSMapView, keyPath == "mapScale" {
print("Map scale changed to \(mapViewThatChanged.mapScale)")
}
} or if you're using Swift 4, it might look like this: private var scaleKvoToken:NSKeyValueObservation?
override func viewDidLoad() {
super.viewDidLoad()
scaleKvoToken = mapView.observe(\.mapScale) { mapViewThatChanged, _ in
print("Map scale changed to \(mapViewThatChanged.mapScale)")
}
}
... View more
11-07-2017
10:34 AM
|
2
|
0
|
1095
|
|
BLOG
|
Each of our Example Apps is designed to provide some inspiration for your own. If you’re interested in building your own custom app because one of our off-the-shelf apps isn’t quite right for you, then the Example Apps are a great place to start. With the Maps App for iOS, we show how you might build the foundation of your own ArcGIS Runtime mapping app using Swift. The open source app (which you can download and build from GitHub) highlights fundamental Runtime functionality and showcases some approaches to coding against asynchronous services. It includes a robust internal framework and a modern, decoupled UI. In later posts, we’ll take a look at the UI/UX and what it took to put the app together, but for now let’s take a look at using the app. Search & Geocode To search, simply start typing into the Search Bar at the top of the screen. As you type, you’ll see suggestions appear, and you can either pick a suggestion or search for the text you’ve typed. By default, you can search for places or addresses using the ArcGIS World Geocoder, and the suggestions will prioritize matches close to the center of the map. Reverse Geocode If you tap and hold on the map, you’ll see a magnifier. Use this to pick a point on the map and when you’re done, you’ll get the address of that point. Turn-by-turn Directions Whether you’ve searched or reverse-geocoded, the results panel includes a “Directions” button. Tap this to calculate directions from your current location to the search result. At the top of the screen you’ll see an overview of the entire route, and at the bottom you can see turn-by-turn directions. Just swipe through them and the map will update to display the current step. If you ever want to go back to the entire route, simply tap the route summary at the top of the screen. Note: Since the routing service consumes ArcGIS credits, you'll need to log in to get directions. The ArcGIS Runtime includes a Credentials Cache and by default, if you've already logged in, the Runtime is able to intelligently make use of cached credentials to avoid prompting you for a login. Switch Basemaps The application also allows you to pick from a set of basemaps. If you are logged in to an ArcGIS Organization or to an ArcGIS Portal, then the list of basemaps will reflect those configured for your account. If not, then you'll get to pick from the default ArcGIS basemaps. Browse your Web Maps The last bit of functionality the app provides is the ability to browse and open your Web Maps. When logged in to ArcGIS the Maps App makes use of the Runtime Portal API to query your content and present you with a list of Web Maps. Simply tap one to open it in the app. What did we learn building this functionality? There are some interesting points to consider from all this. Authentication In the case of getting directions and browsing Web Maps, the user must log in. But how should your app behave when the user isn't logged in? When not logged in, we decided to allow the user to search and geocode using the ArcGIS World Geocoding Service (which is free to use, as long as you're not storing the results). But once the user is logged in, the Maps App uses the Portal API to determine which Geocoding Service and Routing Service to use and, as mentioned above, which basemaps to list. Your ArcGIS Organization's Administrator can configure these settings, so it's important that your app reads and honors that configuration. Lastly, consider how a user should be prompted to log in. For the Maps App we opted to make use of the ArcGIS Runtime's integration with OAuth 2.0, which made implementing login really straightforward. iOS Location Permissions It's also important for an iOS app to behave properly if the user hasn't enabled Location Services or has explicitly denied the app access to their location. When possible, asking for directions will get directions from the current location, but if that's not available then the app will get directions from the center of the current map view.
... View more
10-19-2017
07:45 PM
|
0
|
8
|
3040
|
|
POST
|
Hi Chirag, To center the map on the marker, yes, you should use the setViewpointCenter:completion:() method on AGSMapView and display the callout in the completion block to the above method. Since this is a point graphic, you can pass in the graphic's geometry. That'll animate the map view to put the marker in the center. Could you provide more information on the callout display glitch please? Does it happen on both the simulator and the device? I'll try it out here to see if it's something obvious but would be helpful to get more details. Cheers, Nick.
... View more
10-09-2017
07:39 PM
|
1
|
0
|
911
|
|
POST
|
Probably best to post a question like that over on the ArcGIS API for JavaScript space. But if your previous require statement worked, this will work too. Since you're getting started with the APIs, perhaps take a look at the Develop sections of the DevLabs and Hackerlabs (including the 3.x labs).
... View more
06-14-2017
06:14 AM
|
0
|
0
|
1566
|
|
POST
|
There is a free Geometry Service, but in many cases now you do not need it since the 3.x geometryEngine and 4.x geometryEngine can do much of the work in the browser. It's quicker that way and doesn't require a network request. If you still need functionality of the GeometryService, you can find a reference to a hosted GeometryService in the documentation for the GeometryService task (3.x, 4.x). However, I recommend using the geometryEngine where possible. P.S. I'll see if we can get this thread moved to the JS API forum.
... View more
06-14-2017
06:04 AM
|
1
|
0
|
2061
|
|
POST
|
No problem . The following should get you the radius in meters: var radius = geometryEngine.distance(geometry.getCentroid(),geometry.getPoint(0,0),"meters");
... View more
06-14-2017
05:59 AM
|
0
|
0
|
1566
|
|
POST
|
Ah. That's a very different question. You should use Polygon.getCentroid() to get the centerpoint of the circle. Then use Polygon.getPoint(0,0) to get a Point from the circle and use geometryEngine.distance() between the two points to determine the radius. That assumes you used the Draw.CIRCLE type when you call draw.activate(). Please note that you appear to be using the draw-end event and it seems that is deprecated in favor of the draw-complete event.
... View more
06-14-2017
05:44 AM
|
0
|
0
|
1566
|
|
POST
|
You can do the same thing. Use the JavaScript GeometryEngine. See geometryEngine GeodesicBuffer which will give you a circular polygon back around the center point, and you can then use Graphic and GraphicsLayer to add these to your MapView.
... View more
06-13-2017
10:04 PM
|
0
|
2
|
4065
|
|
BLOG
|
Hey Nicole, Sorry for the slow reply. Not sure how to do that off the top of my head, because I'm not familiar with Web App Builder but if it's the developer edition then you should be able to include custom JS in the app header and use something like the code here to parse the URL and then window.open() to open a fresh URL passing appropriate parameters. I'm assuming you want to open the different app in a new window, but I think this should help. If you got it figured out, please let me know how you did it. Also, it might be worth posting the question in https://community.esri.com/community/gis/web-gis/web-appbuilder's GeoNet space. Cheers, Nick.
... View more
05-26-2017
01:42 PM
|
0
|
0
|
882
|
|
POST
|
Yep. I agree. Keeping a reference is usually the right approach. In very rare cases I've found the need to pass AGSGraphicsOverlay objects around and not necessarily know where they came from or who they belonged to but still know a little about them. In that case you could extend the AGSGraphicsOverlay class something like this: extension AGSGraphicsOverlay {
fileprivate struct AssociatedKeys {
static var referenceNameKey = "geodev_referenceName"
}
var referenceName:String? {
get {
return objc_getAssociatedObject(self, &AssociatedKeys.referenceNameKey) as? String
}
set {
objc_setAssociatedObject(self, &AssociatedKeys.referenceNameKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
}
}
}
For more info on associated objects and Swift, see here.
... View more
05-05-2017
01:00 PM
|
1
|
1
|
1176
|
|
POST
|
Impossible to say without more information, but I can take a guess. It sounds like you might be creating a desktop locator rather than a Runtime locator, depending on your Python code, but I don't know if you can't open it or you can't call it. If I were you I would generate an MMPK as I outline above (you can of course use Python to do that). That will include your locator ready for runtime use which you can access off the LocatorTask property of the MMPK. It'll also include the VTPK. A benefit there is that the basemap and locator will packaged together and you don't have to worry about deploying them both. But really this is beyond the scope of this thread. You should contact support who can walk you through figuring out the issue.
... View more
04-20-2017
11:05 AM
|
0
|
2
|
2021
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-14-2026 07:07 AM | |
| 2 | 04-30-2026 10:59 AM | |
| 4 | 04-22-2026 08:07 AM | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |