|
POST
|
Afraid not, so I wrote you one 🙂 For simplicity, I load up a few WebMaps ahead of time (you might want to do this on-the-fly in your app). I'll use these as basemap options. I'll also load up one WebMap with actual content. When the user picks a different basemap, I reference the content WebMap and the appropriate basemap WebMap. The only additional trick is to store and set the extent "around" the basemap change, otherwise each basemap change returns the map view to the content WebMap's default (saved) extent. I also don't initially set the basemap, but just rely on the "Content" basemap. You'd want to take care of that in a real app. Hope this helps, Nick.
... View more
07-11-2012
04:39 PM
|
0
|
0
|
1144
|
|
POST
|
Hi John, Have you looked at AGSWebMap::openIntoMapView:withAlternateBaseMap: and AGSWebMap::openIntoMapView:withAlternateBaseMap:resetMapView:? If you have an AGSWebMap whose basemap layers you want to use, use the AGSWebMap::baseMap property to get an AGSWebMapBaseMap object, and pass that in to one of the above function on the AGSWebMap whose basemap you want to update. Note, you could just use the stock basemaps (although Bing and OSM may be special cases) rather than creating your own. Hope this helps, though I'm not 100% sure I understood your question. Nick.
... View more
07-11-2012
09:04 AM
|
0
|
0
|
1145
|
|
POST
|
Hey Rob, I *think* I see what you're saying now, but if so I don't see what could be going wrong so it may be time to look at some code. Could you attach a project here for me to look at, PM me or send me an email (use my forum ID at esri.com)? Cheers, Nick.
... View more
03-16-2012
10:30 AM
|
0
|
0
|
2885
|
|
POST
|
Hi Anoop, In short, since everything used by the web and mobile SDKs is being projected onto a flat (2D) surface, it will need to have a spatial reference (essentially a set of rules describing that projection). Many web/mobile maps use spatial reference 102100 (Web Mercator Auxiliary Sphere). This is good for display. It's what consumers have come to expect (hence why many of our basemaps use that spatial reference). But it's probably not best way to store geodata in most parts of the world, so you may encounter various spatial references across the data you use. In the documentation you quote, the gist is this: The first layer you add to the map will define the map's spatial reference. Once the map's spatial reference is set, all data will display in that spatial reference. Because Tiled Layers are cached in a predefined spatial reference, they cannot be re-projected on the fly (re-projecting takes effort, so it would defeat the purpose of caching them!). That is why the spatial reference of tiled layers must match the spatial reference of the map. Because Dynamic Layers are not cached, they may be projected on-the-fly. So while they must have a spatial reference describing the stored data, they can be re-projected to the map's spatial reference on request. Again, this can take effort on the server or client, so it's a balancing act, but in practice in most cases you'll be OK. See also here and here to learn more about Tiled and Dynamic layers. As for your example, the service is a GlobeServer service. You cannot use this with the mobile or web SDKs. Instead, here is the 2D equivalent. Note the type is Feature Layer. Because it's for use in 2D, it has a spatial reference. [Note also, it's in extended support and you should really use this.] Hope this clears things up a little. Cheers, Nick.
... View more
03-16-2012
05:23 AM
|
0
|
0
|
1015
|
|
POST
|
Hi Robert, I'm not entirely sure I understand what you're asking, so please set me straight if I've got it wrong, but I think you want to have a UIView displayed above the AGSMapView and you want it active (i.e. the user can interact with it) only some of the time? Take a look at this post. You could set the userInteractionEnabled property of the UIView displayed above the map to control whether it traps UI events or not. Set it to NO and the events pass right on through to the map. Again, apologies if I've misunderstood. Let me know. Cheers, Nick.
... View more
03-16-2012
03:48 AM
|
0
|
0
|
2885
|
|
POST
|
Hi Joshua, You need to set the map view's layer delegate. Add this line to your viewDidLoad method: self.mapView.layerDelegate = self; Edit: Also, see Nimesh's answer below. That should get you into the mapViewDidLoad: method. Cheers, Nick.
... View more
03-06-2012
09:20 AM
|
0
|
0
|
766
|
|
POST
|
For 10.0, the toolset is arranged differently but attacks the same problems. I should also point out that at ArcGIS for Server v10, you can use the maxAllowableOffset property of an AGSFeatureLayer to generalize on-the-fly. This blog post covers the topic. Nick.
... View more
03-05-2012
06:11 AM
|
0
|
0
|
2918
|
|
POST
|
Hi Anoop, Good questions. Much of this is outside the scope of this thread and forum, but I'll try to give you some pointers. I didn't knew about generalization and our server version is 9.31. This is something we should implement on server side rite? Yes, server-side. And also how can we know if a layer is not generalized? Generalization is merely the process of reducing the "resolution" of your vector data to a level that suits your purposes (in this case, rendering at given zoom levels). For example, a polyline with thousands of points in it which is good for plotting a wall-sized map may only need one tenth the number of points to look exactly the same on a small screen. A better question might be: How do you know whether a feature class needs generalizing? Let's just consider viewing the data (editing is another issue, and the general rule is not to edit generalized data directly). And remember this discussion is for dynamic layers only (i.e. not tiled layers). [INDENT] Ex. 1: You could have a problem if you zoom in on a polyline or polygon layer much further than your app needs and can still see a lot of detail. That means that when you're zoomed at a working level, the data is too detailed for what you can see at that scale. Ex. 2: You could perhaps have a polygon that is the right level of detail, but that is much larger than your visible working area. The single polygon still needs to be pulled over in its entirety for rendering. Solving that can be a whole separate discussion. Ex. 3: You might find (as is possibly the case here) that the data is more detailed than your client specifications allow for, and so you'd want to create a generalized set of that data just for that client app. [/INDENT] There is a lot to consider. Client limitations, bandwidth, managing the data, data updates, editing. The 9.3 documentation has a short discussion on the topic and overview of the operations. You will need an ArcInfo license to use most of the tools (you'll probably need "Simplify Polygon"). For 10.0, the toolset is arranged differently but attacks the same problems. I do work with many complex layers with boundary of various states, municipalities etc. To be exact all the layers have some kind of complex irregular graphics in it 😞 If it were me, the first thing I would do is try to show that it is these complex layers that are causing your memory issue. Either use the profiler, or create a test set of generalized layers and use those. If so, try to categorize your feature classes: "Needs generalizing" (causes a memory warning), "could do with generalizing" (takes a while to load, but doesn't cause a memory warning), and "fine as it is". That should put you in a better position to work out your next steps (and longer term data management goals if necessary). Hope this helps a little, Nick.
... View more
03-02-2012
08:09 AM
|
0
|
0
|
2918
|
|
POST
|
Hi Anoop: I need a little more clarification, when multiple map layers are added the basemap is loaded first and the layers are redrawn from bottom to up manner rite? Yes. You add the bottom-most layer first and other layers are added on top in the order you add them using addMapLayer:withName:. See also the Layer Concepts Overview page for info about the Map's spatial reference. If there are any dynamic layers below a tiled layer, they will be masked if a tiled layer is fully loaded so we can safely hide these "masked layers" and save network traffic and memory. Not necessarily. A Tiled Layer may have transparency (see the World Transportation layer for an example). In this case, you would probably not want to hide layers added earlier in the sequence. As always, consider the data you're working with. Please do share if there are some memory management solution regarding this context. Here are a couple of thoughts: Add and Remove layers: You could consider using the AGSMapView's removeMapLayerWithName: and insertMapLayerWithName:atIndex: methods. Provided you are not somehow retaining a handle to the removed layer or layer view (you'd have to do it quite deliberately) that should help. Use the profiler to see. In my testing this helped reduce the footprint a little (although it may be no better than just hiding the layer as Nimesh suggested). Generalize complex lines/polygons: Note also that a Dynamic Layer will load the data as provided by the server and may cause a spike as it is loaded and rendered. If you find that you have very complex data, you could consider generalizing that data on the server end. In fact, if I add this layer (which is not generalized) and view the memory profile as it loads, it causes a spike in memory usage to well over 25Mb as the data is loaded before dropping down again once rendered. When testing against a generalized copy of the same dataset, the memory usage stays very low. Hopefully this will help a little. Cheers, Nick.
... View more
02-29-2012
05:59 PM
|
0
|
0
|
2918
|
|
POST
|
Hi Melinda, Might be a little cut-and-paste error in there. I think you mean something like: NSMutableDictionary *graphicAttributes = CurrentFeatureGraphic.attributes;
[graphicAttributes setObject:MarkupDescription.text forKey:@"Description"];
... Faisal: It's also worth noting that you probably shouldn't update the OBJECTID for an existing feature. This is auto-generated and shouldn't be updated (unless you've deliberately done something very odd to the feature class, and it's highly unlikely you'll encounter that). And for added decoupling from the attributes dictionary or geodatabase schema, you should consider using AGSFeatureLayer's objectIdForFeature: method when reading the Object ID. Nick.
... View more
02-29-2012
05:21 PM
|
0
|
0
|
2021
|
|
POST
|
Hi guys,i have next code, where answerText is UITextField if (answerText.text == @"1") { NSLog(@"YES"); } else NSLog(@"NO"); this code always returns NO when i type in textField "1" (in iOS Simulator),it returns YES only when i type in Xcode answerText.text = @"1",why? Hi. You're comparing pointers to two strings. Remember, @"1" is just a shortcut to create a brand new NSString object containing the single character '1'. Both strings *look* the same, but they are separate objects. Instead use isEqualToString: (see Apple's documentation). if ([answerText.text isEqualToString:@"1"]) { NSLog(@"YES"); } else NSLog(@"NO"); Cheers, Nick. UPDATE: I just happened across this road map from Apple, and this page seems particularly relevant.
... View more
02-29-2012
09:56 AM
|
0
|
0
|
1039
|
|
POST
|
In addition to those steps, it is crucial to add this line of code when you create the feature layer, in order to get all the outfields available: self.myfeatureLayer.outFields = [NSArray arrayWithObject:@"*"]; Hi Mason, It's probably also worth noting that you should consider this in the context of the data you're pulling down and the requirements of your popup. While this is certainly the easiest way to make sure you have everything at your fingertips, for data sources with many fields and/or sources that might have fields with large amounts of data in them, consider only listing the fields you want to make use of (especially if running over 3G). Nick.
... View more
02-29-2012
09:34 AM
|
0
|
0
|
1200
|
|
POST
|
.....make me want to post to this forum more:) And so you should, Adam (sorry I called you Aaron before!)! Glad you were able to work it out. Please do post here if you encounter problems with the SDK. We can't always promise to solve every problem, but we do the best we can 🙂 Nick. (BTW, if there's a checkmark on the post I provided above, perhaps you could mark this answered? It helps as I scan forum posts to see if I can help out.)
... View more
02-24-2012
01:38 PM
|
0
|
0
|
1167
|
|
POST
|
Hi I trying to teach myself how to make mobile apps for the iOS, So i bought two classes from ESRI in December. Well that have not updated the class to match with the new 4.3 or the new OS Lion. The people at ESRI Training have been very unhelpful, I was hoping the forum could set me in the right direction. I did the class did like it said, but all i get is a white screen in the simulator (The web map did not load). I also tried using the soultion files but no luck. I have attached my project below. here is the software requirement for the class: ArcGIS API for iOS 2.0 Macintosh computer running Snow Leopard Xcode 4 iOS SDK 4.3 or higher Included with the Xcode 4 installation This is my software" ArcGIS API for iOS 2.1 Macintosh computer running Lion 10.7.3 Xcode 4.3 iOS SDK 5 I feel like this is some syntax error that not registering. please help1 Hi Aaron, I'm sorry to hear you're having trouble. I've built myself a VM with Mac OS X updated to 10.7.3 and Xcode 4.3 downloaded from the Apple App Store as well as the latest ArcGIS API (2.1). However, I'm unable to reproduce the problem. The solution you attached builds and runs fine and shows me the expected map display in the iPhone simulator. At least we know it's not a syntax error 🙂 Are you able to run the attached project and see a map of the world? Note: you may need to change the "Library Search Paths" project build setting. If not, could there be network problems/firewalls preventing you from accessing the data sources? Try opening this link from your developer machine. You should see a map of San Francisco 311 incidents. Cheers, Nick.
... View more
02-24-2012
03:51 AM
|
0
|
0
|
1167
|
|
POST
|
Hi Patrick, Glad I could help. And thanks for marking it answered 🙂 Cheers, Nick.
... View more
02-22-2012
06:31 PM
|
0
|
0
|
2558
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Thursday | |
| 4 | 2 weeks ago | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM | |
| 1 | 11-05-2025 10:52 AM |