POST
|
I am trying to generate a TPK from ArcMap. My root data block has a spatial reference of 3163. I have one layer in it. I want to generate a TPK. The only options I have in the TPK in the tiling scheme are : "ArcGIS online ...", "Existing map service" and "Tiling scheme file" (approximate translations from french). If I choose "Arcgis online" I end up with WGS84 spatial reference which I cannot use because my TPK needs to be used with other 3163 TPKs. If I choose any of the 2 other choices, a dialog comes up asking me to select a file but I don't know which file is expected, nor I know how to generate that file. I just want to specify a spatial reference and optionally the zoom levels I want. When I try to share a service description file, I end up with a ".sd" file but it is not accepted as the input of "Existing map service" option. Anyway when generating the service description I cannot define my spatial reference. Well, I am a bit lost in the ArcMap options. Could anyone help me with this or could give me some hint about a step by step procedure on how to generate a customized spatial reference TPK ? Thank you very much !
... View more
09-11-2013
03:20 PM
|
0
|
1
|
904
|
POST
|
Hi! There is no way for adjusting transparency of a layer in the iOS framework, while this feature does exist in all other platforms. It was even possible in earlier versions of the SDK (<10.1.1) through the mapLayerViews which returned the AGSLayerView. Through this layer view we could set the "alpha" property. This is very annoying that such basic settings could no longer be defined. Is there any plan to fix this ? Christophe.
... View more
07-17-2013
03:43 PM
|
0
|
2
|
2659
|
POST
|
Well, I use the "AGSLocalTiledLayer" which loads from a TPK file (some sort of ZIPed cache service export). I can set minScale, but it does only affect the visibility of the layer, not the zooming capacity. That causes the layer to disappear beyond a given scale level. But still, if this layer is your basemap (the first one added), you won't be able to zoom all scales. Well, at least I don't know how to do... I think I cannot get the behaviour you have (stretching the most detailed scale available), and I cannot afford to redevelop all this offline layer. I think I might be able to just subclass the AGSLocalTiledLayer to make zooming possible, but I don't really know what to override... Christophe.
... View more
05-29-2013
01:42 PM
|
0
|
0
|
407
|
POST
|
Well, just found the fix ! Just in case others made the same as me : I was first calling : NSOperation *nsOp = [_featureLayer addFeatures:submittedGraphics]; And then sending attachements inside the "didFeatureEditsWithResults" callback. The problem was that I was manually starting the nsOp of the addFeatures because sometimes, it does not start - other bug fixed here http://forums.arcgis.com/threads/80488-Potential-ARC-problem-with-AGSRequestOperation-sharedOperationQueue. Those 2 problems were very confusing : Because of the NSOperationQueue bug (from the other forum thread), the operation did not start, and so in this case the [nsOp start] was fixing the issue. But as soon as I fixed this, the [nsOp start] is causing the EXC_BAD_ACCESS when a second operation terminates. I think that maybe, since the NSOperation is a specific ArcGis implementation, you could enforce safety by not allowing to start the operation if already enqueued... Hope this helps. Christophe.
... View more
05-28-2013
04:43 PM
|
0
|
0
|
355
|
POST
|
Hi ! Sorry but it's been a week I am struggling with this problem and I cannot find any valid solution / workaround. Here it is: I have a valid feature layer (as an instance "retain" variable) The feature layer has editing capabilities and attachments are enabled I add attachments to an existing object by calling addAttachment method of my feature layer The operation starts, ends, my callback "didAttachmentEditsWithResults" is called, everything is in success. I do nothing in my callback except logging the event. Almost immediately after my callback is called with SUCCESS, the app throws EXC_BAD_ACCESS After the crash when I restart the app, I can see that everything has been done : attachments are here and are correct. Here is my code : // Processing all images as attachments for(MobileImage *mobileImage in mappedInfo.images) { // Getting NSData from PNG representation of image NSData *data = UIImagePNGRepresentation(mobileImage.image); // Starting attachment operation [self startOp:@"Envoi des photos"]; [_featureLayer addAttachment:objectId data:data filename:[NSString stringWithFormat:@"photo%d.png",objectId] contentType:@"image/png"]; } I truly don't know what to do... I am pretty sure that it has something to do with what the framework does when the operation finishes but I cannot see what it is. The stack informs me that the bad access comes from a queue : com.apple.root.default-priority 0 ____NSOQSchedule_block_invoke_0 4 _pthread_wqthread Here is a snapshot of a crash report if that can help : Incident Identifier: 33F9096B-0C2A-4C9F-A83E-375E3405F101 CrashReporter Key: aa7498c8b20065b9dc7de94160ca06ff914d8d37 Hardware Model: iPhone5,2 Process: arcgisproto [666] Path: /var/mobile/Applications/C89651E3-5F52-4E55-94D0-8B31FDBEA2F8/arcgisproto.app/arcgisproto Identifier: arcgisproto Version: ??? (???) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2013-05-29 10:23:03.727 +1100 OS Version: iOS 6.0.1 (10A525) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x6b42a90d Crashed Thread: 7 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0 libobjc.A.dylib 0x3911e5cc 0x3911b000 + 13772 1 UIKit 0x339249ba 0x338d7000 + 317882 2 UIKit 0x33924090 0x338d7000 + 315536 3 UIKit 0x33923ca4 0x338d7000 + 314532 4 UIKit 0x33bfe02a 0x338d7000 + 3305514 5 UIKit 0x338e7656 0x338d7000 + 67158 6 UIKit 0x338e6f06 0x338d7000 + 65286 7 UIKit 0x338e6e80 0x338d7000 + 65152 8 UIKit 0x338e6e4a 0x338d7000 + 65098 9 UIKit 0x338e6e0e 0x338d7000 + 65038 10 AppSupport 0x386353e2 0x38632000 + 13282 11 CoreFoundation 0x3a09f3e4 0x3a008000 + 619492 12 CoreFoundation 0x3a09f386 0x3a008000 + 619398 13 CoreFoundation 0x3a09e20a 0x3a008000 + 614922 14 CoreFoundation 0x3a011238 0x3a008000 + 37432 15 CoreFoundation 0x3a0110c4 0x3a008000 + 37060 16 GraphicsServices 0x3a16d336 0x3a168000 + 21302 17 UIKit 0x3392e28c 0x338d7000 + 357004 18 arcgisproto 0x000b21da 0xb1000 + 4570 19 libdyld.dylib 0x39988b1c 0x39987000 + 6940 Thread 1 name: Dispatch queue: com.apple.libdispatch-manager Thread 1: 0 libsystem_kernel.dylib 0x39e245d0 0x39e23000 + 5584 1 libdispatch.dylib 0x32eb7d22 0x32eb1000 + 27938 2 libdispatch.dylib 0x32eb3374 0x32eb1000 + 9076 Thread 2 name: WebThread Thread 2: 0 libsystem_kernel.dylib 0x39e23e30 0x39e23000 + 3632 1 libsystem_kernel.dylib 0x39e23fd0 0x39e23000 + 4048 2 CoreFoundation 0x3a09f2b6 0x3a008000 + 619190 3 CoreFoundation 0x3a09e02c 0x3a008000 + 614444 4 CoreFoundation 0x3a011238 0x3a008000 + 37432 5 CoreFoundation 0x3a0110c4 0x3a008000 + 37060 6 WebCore 0x34eb1a58 0x34ea7000 + 43608 7 libsystem_c.dylib 0x333af0de 0x3339e000 + 69854 8 libsystem_c.dylib 0x333aefa4 0x3339e000 + 69540 [...] Truncated because message was > 10000 chars [...] Thread 7 name: Dispatch queue: com.apple.root.default-priority Thread 7 Crashed: 0 Foundation 0x32a83708 0x329e4000 + 653064 1 libdispatch.dylib 0x32eb2790 0x32eb1000 + 6032 2 libdispatch.dylib 0x32eb6652 0x32eb1000 + 22098 3 libdispatch.dylib 0x32eb67d4 0x32eb1000 + 22484 4 libsystem_c.dylib 0x333a47ee 0x3339e000 + 26606 5 libsystem_c.dylib 0x333a4680 0x3339e000 + 26240 Thread 8 name: com.apple.NSURLConnectionLoader Thread 8: 0 libsystem_kernel.dylib 0x39e23f38 0x39e23000 + 3896 1 libsystem_c.dylib 0x333bf974 0x3339e000 + 137588 2 CFNetwork 0x32c5e4b8 0x32c4b000 + 79032 3 CoreFoundation 0x3a09f8f4 0x3a008000 + 620788 4 CoreFoundation 0x3a09f158 0x3a008000 + 618840 5 CoreFoundation 0x3a09df2a 0x3a008000 + 614186 6 CoreFoundation 0x3a011238 0x3a008000 + 37432 7 CoreFoundation 0x3a0110c4 0x3a008000 + 37060 8 Foundation 0x32a11098 0x329e4000 + 184472 9 Foundation 0x32a94a3c 0x329e4000 + 723516 10 libsystem_c.dylib 0x333af0de 0x3339e000 + 69854 11 libsystem_c.dylib 0x333aefa4 0x3339e000 + 69540 Thread 9 name: com.apple.CFSocket.private Thread 9: 0 libsystem_kernel.dylib 0x39e34594 0x39e23000 + 71060 1 CoreFoundation 0x3a0a3474 0x3a008000 + 636020 2 libsystem_c.dylib 0x333af0de 0x3339e000 + 69854 3 libsystem_c.dylib 0x333aefa4 0x3339e000 + 69540 Thread 10: 0 libsystem_kernel.dylib 0x39e3408c 0x39e23000 + 69772 1 libsystem_c.dylib 0x333a7afc 0x3339e000 + 39676 2 libsystem_c.dylib 0x333b1cf8 0x3339e000 + 81144 3 arcgisproto 0x005036f8 0xb1000 + 4531960 4 libsystem_c.dylib 0x333af0de 0x3339e000 + 69854 5 libsystem_c.dylib 0x333aefa4 0x3339e000 + 69540 Thread 11: 0 libsystem_kernel.dylib 0x39e3408c 0x39e23000 + 69772 1 libsystem_c.dylib 0x333a7afc 0x3339e000 + 39676 2 libsystem_c.dylib 0x333b1cf8 0x3339e000 + 81144 3 arcgisproto 0x005036f8 0xb1000 + 4531960 4 libsystem_c.dylib 0x333af0de 0x3339e000 + 69854 5 libsystem_c.dylib 0x333aefa4 0x3339e000 + 69540 Thread 12 name: com.apple.coremedia.player.async Thread 12: 0 libsystem_kernel.dylib 0x39e3408c 0x39e23000 + 69772 1 libsystem_c.dylib 0x333a7afc 0x3339e000 + 39676 2 libsystem_c.dylib 0x333b1cf8 0x3339e000 + 81144 3 CoreMedia 0x335d48b4 0x335d1000 + 14516 4 MediaToolbox 0x32fcceaa 0x32fc9000 + 16042 5 CoreMedia 0x335f2978 0x335d1000 + 137592 6 libsystem_c.dylib 0x333af0de 0x3339e000 + 69854 7 libsystem_c.dylib 0x333aefa4 0x3339e000 + 69540 Thread 13: 0 libsystem_kernel.dylib 0x39e34d98 0x39e23000 + 73112 1 libsystem_c.dylib 0x333a4ad6 0x3339e000 + 27350 2 libsystem_c.dylib 0x333a47f2 0x3339e000 + 26610 3 libsystem_c.dylib 0x333a4680 0x3339e000 + 26240 Thread 14: 0 libsystem_kernel.dylib 0x39e34d98 0x39e23000 + 73112 1 libsystem_c.dylib 0x333a4ad6 0x3339e000 + 27350 2 libsystem_c.dylib 0x333a47f2 0x3339e000 + 26610 3 libsystem_c.dylib 0x333a4680 0x3339e000 + 26240 Thread 7 crashed with ARM Thread State (32-bit): r0: 0x1ed2e4f0 r1: 0x00000000 r2: 0x3a07c46d r3: 0x0000005d r4: 0x0000000d r5: 0x6b42a909 r6: 0x6b42a909 r7: 0x065baf68 r8: 0x1ed2d910 r9: 0x00000004 r10: 0x3a07c46d r11: 0x00000004 ip: 0x00000058 sp: 0x065baef0 lr: 0x00000020 pc: 0x32a83708 cpsr: 0x60000030 I tried with the attachment manager, same result. I am stuck. Christophe.
... View more
05-28-2013
04:17 PM
|
0
|
1
|
4003
|
POST
|
I think I face the same bug but at another place. In some use-cases of my app, I need to call : NSOperation *nsOp = [featureLayer addFeatures:graphics] When I call this immediately after map creation, I end up (not always, but VERY often) with an EXC_BAD_ACCESS. When I call this after a while, I generally have an operation which is never executed. I think there are some problems with operation queueing... But since I am not queuing the operation myself (it is internally queued by the "addFeatures" call and it returns the queued NSOperation), I cannot use your workaround. I tried to add an Objective-C category on AGSRequestOperation so that sharedOperationQueue returns one of my own allocated operation queue. For now it seems to work. But note that it seems not to work with a static variable, don't know why. @implementation AGSRequestOperation (Operation)
+ (NSOperationQueue *)sharedOperationQueue {
return [Utils getQueue];
}
@end And the Utils code :
// Declaration in .h file
@property (nonatomic,strong) NSOperationQueue *operationQueue;
@implementation Utils
- (id)init
{
self = [super init];
if (self) {
_operationQueue = [[NSOperationQueue alloc] init];
[_operationQueue setMaxConcurrentOperationCount:10];
}
return self;
}
+ (NSOperationQueue *)getQueue {
return _operationQueue;
}
@end Actually, I don't really know what arcgis does internally to schedule this task. All I know is that there is something not good regarding object allocation / retain thing. I need some more tests to make sure that it works ALL the time. That would be great to have inputs from an ArcGis guy and to investigate on a fix. Christophe.
... View more
05-27-2013
04:33 PM
|
0
|
0
|
362
|
POST
|
Hi, Sorry, actually the first code I posted seems to work now. I think I was manipulating the coordinates with incorrect datatypes, so my coordinates were truncated before being plotted on my map. Everything works great now. Christophe.
... View more
05-26-2013
09:16 PM
|
0
|
0
|
329
|
POST
|
Hi everybody ! Here is the context : My app supports offline mode by providing a layer loaded through a TPK file When the app has Wifi / 3G access, data is displayed through a tiled map service layer Here is my problem : The data from the TPK are for a zoom scale of 100000. My map service provides much better zoom scales. What I would like to do is to be able to add my "offline" layer (the local layer from my TPK) first, then my map service layer, then feature layers, then sketch layer, etc. This way, I would display the "offline" layer only if my map service is not available, as a fallback. The problem with this configuration is that I can only zoom in to the max scale of my offline layer... which is a shame because when map service is accessible, I can have much more detailed information. The workaround I used is to first detect if network is reachable and then if so omit addition of the offline layer and add the map service layer first as the base. But then as soon as the network becomes unreachable I need to remove all layers and re-add the offline layer first and then all the others. This results in hugly code, but it works. But one problem subsists when we start the app with unreachable network : in this situation the offline layer is loaded first (as no map will be loaded if I add the unreachable map service layer first) and I could not zoom more than the resolution of the TPK. Even when network becomes reachable again, removing all layers to put the map service layer in first place does not change anything. Is there any way to allow zooming in to "the best possible resolution from all layers" ? Or at least to override the max zoom scale to programmatically allow zooming in more than normal ? What would you advise to do in this situation ? Thank you very much, Christophe.
... View more
05-22-2013
08:44 PM
|
0
|
3
|
2688
|
POST
|
Hi, I looked in the other threads and cannot find anything about this problem. Maybe it's my misunderstanding of the way to project a point. I need to convert device's latitude and longitude to my map which is in a 3163 spatial reference. I do the following : Get the current location from SDK's CoreLocation framework When I need to plot a point on current location, I initialize the current lat/long as an AGSPoint with a WGS84 spatial reference. Then I project it to the spatial reference 3163 and I add this point to one of my graphic layer This results in the point being misplaced all the time. I first tried the following : _defaultSpatialRef = [AGSSpatialReference spatialReferenceWithWKID:3163]; AGSGeometryEngine *engine = [AGSGeometryEngine defaultGeometryEngine]; AGSPoint *point = [AGSPoint pointWithX:currentLocation.coordinate.latitude y:currentLocation.coordinate.longitude spatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS84]]; AGSPoint *projectedPoint= (AGSPoint*)[engine projectGeometry:point toSpatialReference:_defaultSpatialRef]; This sample code always result in returning "nan" information in the resulting AGSpoint x and y coordinates. Because I was not sure how to map X and Y as latitude and longitude I tried to switch lat / long so that X is mapped to longitude and Y mapped to latitude in my origin WGS84 point. This time, I get results but the resulting point seems to be outside my map's bounds. Here are my information : location latitude = -22.2682 location longitude = 166.442 First try when mapping X with latitude and Y with longitude in my initial point that I project => nan / nan as resulting projected AGSPoint X and Y Second try when mapping X with longitude and Y with latitude : projected point X = 445586.569662 projected point Y = 214879.873427 I think my X should be negative but not sure. Here are my questions : - Which way should I map X/Y to lat/long (in all other examples I saw X->lat and Y->lng but it does not give any result) - Am I doing it the right way or missing anything ? Thank you very much for your time and answers. Christophe.
... View more
05-12-2013
05:27 PM
|
0
|
3
|
2492
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|