POST
|
Thanks for the write-up, Anthony. This may be a bug. We're looking into it and will post something when we know more. Nick.
... View more
03-25-2015
11:26 AM
|
0
|
7
|
1387
|
POST
|
I have the workings of a clusterLayerForGraphicsLayer function. I need to tidy it up a little more. Hopefully I can get to that tomorrow. Will let you know here. Thanks, Nick. Update: I didn't get to it when I hoped I could. It's back on the list now that DevSummit is behind us. I've opened an issue at the GitHub Repo. You should track that from now on.
... View more
02-25-2015
04:46 AM
|
0
|
0
|
1355
|
POST
|
Hi Muzammil, Thanks for sending me the sample project. So, you were really close. The problem is that Xcode was not copying the Network_ND files to a .tn subfolder when building the target. Rather they were sitting at the top-level, right next to the .geodatabase file. So, use the following code (pretty much your original code without .geodatabase in the name, but it's good practice that we check explicitly for an error): NSError* error = nil; self.routeTask = [AGSRouteTask routeTaskWithDatabaseName:@"network_projected" network:@"Projected_Network_ND" error:&error]; if (!error) { // assign delegate to this view controller self.routeTask.delegate = self; // kick off asynchronous method to retrieve default parameters // for the route task [self.routeTask retrieveDefaultRouteTaskParameters]; } else { NSLog(@"Could not open local network dataset: %@", error.localizedDescription); } Also, no need to set up parameters at this point since the didRetrieveDetrieveDefaultRouteTaskParameters handler will do that. You must now modify your target properties to specify where to copy the _ND files. See the following screenshots. 1: Create a new Copy Files build phase with the + button at the top of the Build Phases list: 2: Expand the new Copy Files phase, set the subpath to a .tn folder (in your case, "network_projected.tn") and click the + at the bottom of the phase to add files: 3: Add the files to the Copy Files phase: It should end up looking like this: Run your project and you should see default parameters being retrieved OK. It seems that if you provide a database name that can't be found, no error is returned. That seems like a bug to me, which I've reported to the iOS team. Even without that, Xcode would have had to be configured as above, but it might have saved some confusion! Hope this helps! Cheers, Nick. P.S. For anyone following along, please note that the network dataset name in this reply is slightly modified from the original question.
... View more
02-20-2015
07:59 AM
|
1
|
0
|
843
|
POST
|
Unfortunately no, currently the AGSGDBFeatureServiceTable is meant to be used with a layer. I will see if we can make the documentation clearer on this.
... View more
02-19-2015
11:57 AM
|
0
|
0
|
281
|
POST
|
Hi, I'll have to take a look at the code to see, but it should be possible. To be clear, you want to populate a GraphicsLayer yourself, and then cluster the content? Nick.
... View more
02-18-2015
01:18 PM
|
0
|
3
|
1355
|
POST
|
Hi Muzammil, If the folder is named network.tn, then that looks correct to me. Can you check whether error is populated with an error object after the call to routeTaskWithDatabaseName? Thanks, Nick.
... View more
02-18-2015
11:25 AM
|
0
|
2
|
843
|
POST
|
I created this plugin a few months back. It provides a cluster layer for the iOS Runtime to allow clustering of point-based feature services: nixta/clusterlayer-plugin-ios · GitHub Note, this is not an official Esri component. (CC Farzana Yasmeen)
... View more
01-17-2015
12:53 PM
|
2
|
5
|
1355
|
POST
|
You could create a custom tiled layer which contains an instance of the runtime's layers, and cache tiles as they're returned by the contained instance, before you pass them back to the AGSMapView. This repository does a similar thing, but it applies a Core Image Filter to each tile before passing it on rather than caching it. However, you would need to carefully consider how to handle cache cleanup and constraint. What do you eject from the cache when memory constraints start getting hit: Least used? Oldest in cache? Furthest from current extent? Furthest from current zoom? Do you eject groups of tiles at once, or individual tiles - you probably want to consider contiguous areas. Doubtless the best solution would be some combination of all of those. Note: Even if you came up with a good caching strategy, to do this against one of the Esri provided basemap layers would, unfortunately, currently be against the licensing terms.
... View more
01-17-2015
10:51 AM
|
0
|
0
|
373
|
POST
|
Your GP Service only has the Execute endpoint, so you should use the synchronous call: [self.geoprocessor executeWithParameters:params]; However, that still doesn't work for me, but I'm not convinced that I know how to get your GP Service to work. I'm unable to run it from the web interface. If using the above call doesn't work, can you give me some parameters that do work properly from the web interface here: Execute Task (Script) Cheers, Nick.
... View more
11-17-2014
01:12 PM
|
0
|
0
|
538
|
POST
|
I think your instance of AGSGeoprocessor is going out of scope and so is being deallocated before the GP Tool finishes. Try creating a class-level property instead: @property (nonatomic, strong) AGSGeoprocessor *geoprocessor; And change the code to reference that property instead: // Build geoprocessor self.geoprocessor = [AGSGeoprocessor geoprocessorWithURL:gpURL]; self.geoprocessor.delegate = self; ... //Run GP tool with asych delay self.geoprocessor.interval = 10; [self.geoprocessor submitJobWithParameters:params]; } Hopefully that'll get you rolling. Nick
... View more
11-13-2014
09:38 AM
|
1
|
2
|
538
|
BLOG
|
I think it was some dude name Grohn Javois. Have you met him?
... View more
10-08-2014
04:32 PM
|
2
|
0
|
408
|
BLOG
|
I write a lot of demos. When you travel somewhere, show a local map. It helps folks relate, and they're less likely to heckle you. Since we have interactive maps, the best way to get a local map is to search or just pan-and-zoom. But once you've navigated your map to the right place, how do you get hold of the settings to open your demo at the right place? The short answer is JavaScript. The ArcGIS Online map viewer is JavaScript-based. This means that pretty much everything is exposed through the browser's developer tools. You just have to figure out how to get to it. In Chrome, for example, open a map (try a blank one, or find an existing one), and from that browser window click the hamburger icon at the top-right and select "More Tools -> JavaScript Console". The window that opens is the JavaScript view onto the ArcGIS Online page. So just start typing JavaScript to explore! ArcGIS Online exposes a couple of convenient global variables you can access. Type arcgisonline.map.main.map and press ENTER (notice the auto-complete that helps you explore?). What you see is the actual Esri JavaScript API Map object behind the ArcGIS Online map viewer. JavaScript FTW! Here are some examples. For cut-and-pastability, here they are again. Try them out, and follow along at the JavaScript API Reference for the Map class: arcgisonline.map.main.map.getZoom() arcgisonline.map.main.map.getScale() arcgisonline.map.main.map.extent arcgisonline.map.main.map.extent.getCenter() arcgisonline.map.main.map.extent.getCenter().x arcgisonline.map.main.map.extent.getCenter().y arcgisonline.map.main.map.extent.getCenter().getLatitude() arcgisonline.map.main.map.extent.getCenter().getLongitude() All this information can be used to fine-tune your demo, whether it's JavaScript based, Runtime based, or whatever. Bookmarklets That's a lot of opening developer tools and typing at consoles. What if you could just package up the JavaScript you want and keep it handy somewhere. Well, you can, and it's called Bookmarklets. A Bookmarklet is simply a bookmark that, rather than opening a web page, instead just runs some JavaScript on the page you're currently viewing. I've created a Bookmarklet that inspects your current ArcGIS Online map view and shows you some details. You can find it here. Just drag the Bookmarklet named "Get Map Info" to your bookmarks bar. Now, whenever you're viewing a map in ArcGIS Online's Map Viewer, just click that bookmark and you get an alert containing info about the map. Neat! For some more info about bookmarklets, see the quick talk from Cascadia JS below, and check this great tool for packaging your JavaScript up as a bookmarklet-friendly JavaScript. For initializing a map, there's also this tool which will give you a code preview for your demos.
... View more
10-08-2014
04:15 PM
|
3
|
5
|
2687
|
POST
|
So far, it seems to be working... The key was to add ArcGIS.h to the "Objective-C Bridging Header" setting under Swift Compiler - Code Generation of Build Settings. Throwing this out there too... In the case where you have a Swift-only project, you can also do the trick described in this Gist. You'll need an import ArcGIS statement in the .swift file too. E.g. import UIKit import ArcGIS var tileUrl = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" class ViewController: UIViewController { @IBOutlet var mapView : AGSMapView override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. var myLayer = AGSTiledMapServiceLayer(URL: NSURL(string: tileUrl)) mapView.addMapLayer(myLayer) } } Enjoy! Nick. P.S. I guess I should add that (as mentioned in the Gist) this isn't supported by Esri yet. Use at your own risk 🙂
... View more
06-09-2014
10:00 AM
|
0
|
0
|
756
|
POST
|
Hey James. Apologies for the previous answer. I skim read your question and missed that you were using the Spatial Analysis Service 😮 I haven't actually used the Geoprocessor task with the Analysis GP Service at analysis.arcgis.com. It seems to be a wrapper around the Network Analyst task found at route.arcgis.com to allow the request to be queued in the GP Tasks queue that's part of AGOL Analysis (and seems to parameterize some things that get built into lower-level parameters to the underlying NA service). You will need to populate the "serviceToken" property on "analysisLayer". Also, it should probably be "nearLayer" and not "NearLayer". Failing that, the approach I've taken in the past is to hit the Closest Facility Task directly at http://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World/ In that case, your analysis layer URL needs to be a full query, not just the service end point and to include a token if the service is private. For example, this works in the sample I posted up at https://github.com/nixta/PhillyParksDemo: http://services.arcgis.com/OfH668nDRN7tbJh0/arcgis/rest/services/Markets%20close%20to%20parks/FeatureServer/0/query?where=1%3D1&returnGeometry=true&outFields=OBJECTID&outSR=102100&f=json
See also the documentation here under the "facilities" required parameter - there's an example URL right at the end: {
"url": "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/MapServer/1/query?where=1%3D1&outFields=Name,RouteName&f=json"
} Hope this helps. And sorry again! Nick.
... View more
03-04-2014
02:20 PM
|
0
|
0
|
1704
|
POST
|
Hey Darryl, I created one just after UC but need to push it live on Github. Let me revisit and I'll get back to you. Nick
... View more
10-23-2013
12:44 PM
|
0
|
2
|
544
|
Title | Kudos | Posted |
---|---|---|
1 | 12-09-2024 10:16 AM | |
2 | 12-11-2024 11:12 AM | |
3 | 11-25-2024 07:29 AM | |
3 | 11-25-2024 07:36 AM | |
4 | 11-25-2024 07:10 AM |