|
POST
|
The original problem is that the tiled map service layers in the iOS api are displayed with fuzzy, low resolution. Compare to android, which displays tiled layers correctly. The tile imagery looks as expected to me. In the original post, it's only the symbols overlaid on the map which are fuzzy and that has been fixed. In the case of tiles, the global ArcGIS Online tiles have not been generated to retina display dpi. For that reason, the SDKs will render them at the generated tile resolution by default. You can opt to render the tiles at native display resolution by making use of AGSTiledLayer's renderNativeResolution property (which I think is what the Android app does), but it can make label text very small (see screenshots). It essentially gets the next zoom level of tiles and renders them smaller. Tile Resolution: [ATTACH=CONFIG]27608[/ATTACH] Native Resolution: [ATTACH=CONFIG]27609[/ATTACH] Also attached is a project that allows you to switch between native and non-native resolutions to see the difference. Hope this helps, Nick.
... View more
09-19-2013
01:46 PM
|
0
|
0
|
560
|
|
POST
|
This link had me struggling for many hours (please avoid): https://developers.geoloqi.com/ios/maps Hi Carol. I'm intrigued to learn what you struggled with in that blog post. It seems to reflect exactly how we describe setting up projects in the main tutorial you reference elsewhere (and how I set up all my samples). I've not had any difficulty including AGSMapView in a view hierarchy, including as part of a Tab View Controller, so I'd be happy to look into it further with you since we're always keen to know if we can improve documentation. Please let me know. Cheers! Nick.
... View more
09-14-2013
09:15 AM
|
0
|
0
|
502
|
|
POST
|
Hi Hussein. Note that in your screenshot the drop-pin symbology is not blurry, it's just the map tiles. This is because the Geocode sample is using a basemap tile service (http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer) which is no longer updated and which doesn't have global coverage for all zoom levels. If you were to zoom in to that level in the US, you would not see the blurring. Really the sample (and you) should be using http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer. That tile service is the same as used by the basemap picker at ArcGIS Online and by the ArcGIS iOS App. Incidentally, in your screenshot of the app, it's using the Topographic Basemap, not the Streets Basemap. It's a multi-step process to look at an ArcGIS Online basemap and work out the URL to use, so I have created this reference page which may help: https://github.com/nixta/arcgis/wiki/Basemap-URLs Please let me know whether this resolves your issue. Nick. P.S. I have asked that the sample be updated to use the current tile sets.
... View more
09-13-2013
04:24 PM
|
0
|
0
|
2611
|
|
POST
|
Could be. Depends on what the projection is of your map. I'm guessing it's not Web Mercator 😄 My solution will generate you a polygon that is pretty close to circular on the ground (i.e the edge is R miles north and R miles east of the center). If you are using a Web Mercator projection, it will appear circular on the map. If you are using WGS84 for example, it will indeed appear less tall as you move north or south from the equator, by virtue of the projection. If you want something that looks circular on a WGS84 map, and you know that your center point is WGS84, you can either use your & Technobrat's solution or something like this:
-(AGSPolygon*) circleWithCenter:(AGSPoint*)point radius:(double)radiusInMiles
{
AGSGeometryEngine *ge = [AGSGeometryEngine defaultGeometryEngine];
// Get a "circle" around the point, using the 1 decimal degree ~= 69 miles.
AGSPolygon *circle = [ge bufferGeometry:point byDistance:radiusInMiles/69];
return circle;
} But remember that this is approximating the conversion between decimal degrees and meters, which is not constant for longitude as latitude varies. So, it really depends on what you are generating the 10 mile radius geometry for and (in short) how far north or south of the equator. Your solution may be good enough for what you want, but bear in mind that a degree of longitude will be very much less than 69 miles as you approach the poles. On the other hand, your application users may keep asking you why the "circle" is elliptical, and that might be a bigger headache than considering some things that might be more than 10 miles away.
... View more
08-06-2013
01:33 PM
|
0
|
0
|
2676
|
|
POST
|
The units will be decimal degrees. What you might find useful is to buffer around your center-point. Try something like this:
-(AGSPolygon*) circleWithCenter:(AGSPoint*)point radius:(double)radiusInMiles
{
AGSGeometryEngine *ge = [AGSGeometryEngine defaultGeometryEngine];
// Get a point in a spatial reference whose unit is Meters.
AGSPoint *pointToBufferAround = (AGSPoint *)[ge projectGeometry:point toSpatialReference:[AGSSpatialReference webMercatorSpatialReference]];
// Get a "circle" around it, using the unit Meters (1 mile ~= 1609.344 meters).
AGSPolygon *circle = [ge bufferGeometry:pointToBufferAround byDistance:radiusInMiles*1609.344];
// Project the output back to the projection of the input point (which is presumably what you're after).
circle = (AGSPolygon *)[ge projectGeometry:circle toSpatialReference:point.spatialReference];
return circle;
}
That will use Meters (WebMercator's units). Note that your output may not be what you expect as the input or output approaches the poles. Also, there's no guarantee how many points the output polygon will have in its boundary.
... View more
08-06-2013
12:21 PM
|
0
|
0
|
2676
|
|
POST
|
It's quite tricky to positioning the element on the User interface without adding them to the MapView-element. I succeed only positioning the element by the attributes. As I am new to all of this, i hope this helps you too. 😄 Hey Tom. Yep, this is pretty annoying Xcode behavior for me too. I've found the following have really helped me: Drop new UI components into the hierarchy on the left rather than directly into the WYSIWYG editor. Use the cursor keys to move the element. Hold SHIFT while using the cursor keys to move the component quicker. Hold OPTION while using the cursor keys to show position attributes. You can drag to resize a UI component without changing its position in the hierarchy (but drag to move will). COMMAND-Z is your best friend if you drop a control in the wrong spot 😄 Hope that helps too. Cheers, Nick.
... View more
06-03-2013
08:35 AM
|
0
|
0
|
987
|
|
POST
|
This has happened to me once but I couldn't reproduce it. I fixed it by uninstalling from wherever it got installed and running the installer package again. Then it was in the ~/Library... location. I can't quite recall but I may also have rebooted between uninstalling and reinstalling. I'm not happy with this answer, but it might get you going again until the real answer appears 🙂 Let me know whether it works? Cheers, Nick P.S. Caveat: I'm not on the iOS team - they might have a better idea of the problem. EDIT: Ah yes. Now I see your response below, I recall that I had to manually delete the /Library/SDKs directory (not ~/Library/SDKs, mind you!) and the /Library/Application Support/AGSiOSRuntimeSDK directory because, as Divesh mentions, the uninstall script doesn't touch those 🙂 Once I'd deleted those (and made sure I didn't have one under ~/Library), I just tried again and it worked. However, I'm not so confident that'll work for you given your other replies. Nick.
... View more
01-10-2013
07:34 PM
|
0
|
0
|
1482
|
|
POST
|
You cannot just cast an AGSEnvelope to AGSMutableEnvelope (see here). Try something like this:
AGSMutableEnvelope * env2 = nil;
if([featureSet.features count]>0)
{
for (int i=0 ; i<[featureSet.features count]; i++ )
{
graphic=[featureSet.features objectAtIndex:i];
if (env2 == nil)
{
// graphic.geometry.envelope is an AGSEnvelope
// We need to derive a new AGSMutableEnvelope from it.
env2=[graphic.geometry.envelope mutableCopy];
}
else
{
// This is not the first graphic we've come across, so we'll
// extend the working envelope (env2) to include it
[env2 unionWithEnvelope:graphic.geometry.envelope];
}
// Add the graphic to our graphics layer
graphic.symbol=fillSymbol;
[self.graphicsProjectQryLayer addGraphic:graphic];
}
// env2 will now contain all the graphics we just looped over.
// Refresh the graphics layer
[self.graphicsProjectQryLayer dataChanged];
}
This is typical with Cocoa development and Mutable versions of classes. You can generally cast a Mutable object to its non-mutable form (typically it's parent class, so an NSMutableArray is a NSArray), but the other way around requires a new object of some sort.
... View more
12-31-2012
08:05 AM
|
0
|
0
|
596
|
|
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
|
838
|
|
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
|
839
|
|
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
|
2077
|
|
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
|
639
|
|
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
|
2077
|
|
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
|
526
|
|
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
|
1997
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-05-2025 10:52 AM | |
| 1 | 11-04-2025 08:55 AM | |
| 1 | 11-04-2025 08:38 AM | |
| 1 | 11-01-2025 03:25 PM | |
| 1 | 10-29-2025 10:28 AM |