POST
|
We haven't changed the hit-testing mechanism to ignore transparent fills. I am unable to reproduce the behavior you described. Could you please start a new thread and provide some code to repro? New thread started here.
... View more
12-13-2013
02:52 PM
|
0
|
0
|
270
|
POST
|
As requested in the 10.2 sticky thread, I am posting a test harness (see attached .zip) that shows undocumented hit testing behavior changes in 10.2. The test harness creates a basic map with one AGSTiledMapServiceLayer and one AGSGraphicsLayer. The AGSGraphicsLayer contains a single rectangular test graphic that is initially symbolized/filled with the default system color [UIColor redColor] and an alpha value of 1.0. A segmented control is provided that will toggle the alpha value to several values falling between 1.0 and 0.0, and some simple hit testing feedback is provided via on-screen labels, the presentation of a callout, and NSLog statements. In using this test harness with 10.2, I see the following behavior: Case of alpha = 1.0 OR 0.01 : Hits detected on perimeter and interior of test graphic. Case of alpha = 0.0001 OR 0.0 : Hits detected on perimeter but not on interior of test graphic. So, it appears that at some value approaching 0.0, the SDK decides that the alpha is effectively 0.0 and also starts passing hits through without assigning them to the graphic. Also, even at very low alpha values that still intercept touches, the fill is very slightly visible. I would like to be able to use a truly transparent fill (and outline, actually) and still catch interior taps. Prior to 10.2, invisible areas of graphics caught hits and tehcnobrat's comment from the 10.2 sticky thread indicates this is unexpected behavior: [INDENT]"We haven't changed the hit-testing mechanism to ignore transparent fills. I am unable to reproduce the behavior you described. Could you please start a new thread and provide some code to repro?"[/INDENT] Ideally, it seems like developers should be able to set a flag causing hit testing to either use or ignore the alpha value. On the project that led me to report this behavior, I would really like "invisible" graphics to still catch touches because they are sitting over a tiled map service that gives the user a really good idea of where they would like to tap and looks a lot better than a collection of visible graphics. However, I can see myself wanting the opposite behavior for a different use case involving city boundaries or the like. Thanks, and apologies for the belated response; I've been swamped at work and am trying to maintain some semblance of work-life balance 😛
... View more
12-13-2013
02:17 PM
|
0
|
1
|
1521
|
POST
|
I noticed what appears to be an undocumented behavioral change in 10.2 . Previously, the touch-responsive area of a drawn feature was the feature's geometry. So, a rectangular polygon symbolized with a solid outline and clear fill would register a touch for any tap within the polygon. In 10.2, the touch-responsive area of a drawn feature is any non-transparent symbolization for the feature. So, the same rectangular polygon symbolized with a solid outline and clear fill will *only* register touches on the edge of the polygon, where the alpha is > 0 . The SDK treats any alpha value that it can discern as greater than 0 as touchable, so touchable clear polygons are accomplished by setting the clear fill to an alpha value like .01 / 1%, which will show as clear on the map but still intercept touches. One of my current projects is an interior mapping app that provides queryable floor maps by showing transparent polygons on top of a tiled map service. The polygons represent rooms and other interior features the user will want to activate/tap, and the underlying tiled map service provides the scale-appropriate, custom cartography that makes the interior map aesthetic and useful. I'm noting this because I could not find this behavioral change mentioned in the changlelog or the current documentation and because this impacted the use case I outlined above.
... View more
11-12-2013
11:29 AM
|
0
|
0
|
270
|
POST
|
Yes, you are correct. I thought I saw the behavior described but must have been mis-typing or something. Thanks.
... View more
11-05-2013
08:15 AM
|
0
|
0
|
376
|
POST
|
A co-worker asked why I am not simply using the SBJson variant in the ArcGIS Runtime SDK. In case I did not make it sufficiently clear in my first post, the variant is not exposed enough for me to use its methods, or the standard SBJson methods have been renamed/changed. For instance, AGSSBJson does not have, or the Runtime SDK does not expose, the -(id)objectWithData:(NSData *)data method .
... View more
10-24-2013
11:27 AM
|
0
|
0
|
376
|
POST
|
It appears that a typedef in the AGSSBJsonStreamParserState class of the SBJson variant contained within the ArcGIS Runtime SDK for iOS has not been renamed from the original library. If I include SBJson in a project that also uses the ArcGIS Runtime SDK, I get a number of "duplicate symbol" errors for an enum with values of the format AGSSBJsonStreamParserState_< some state > . I attached a modified demo project that attempts to import SBJson. The build will fail and spit out a number of "duplicate symbol" errors. Using CocoaPods for SBJson does not auto-solve this collision. I am using SBJson to build a streaming JSON parser that will process data used for, among other things, display on an AGSMapView. I plan on renaming any conflicting enums in my local copy of SBJson, since this seems to be the quickest way to resolve the issue and the Runtime SDK version is not fully exposed. This is more of a bug report than a request for assistance.
... View more
10-23-2013
07:56 PM
|
0
|
3
|
2702
|
POST
|
Hi there, I'm not sure if I did something wrong, but when I called [map.gps start] to locate current location, my map will sometime zoom in to the lowest scale the map, even though I only called auto pan to current location. The GPS feed can be quite erratic for the first second or two of polling. The first few values returned may also be nil, which could cause issues if you are feeding them into the map's panning/zooming methods. Many of the apps I have written using GPS and the ArcGIS Runtime SDK have a GPS stabilization polling thread that is called when the GPS is first started and notifies when the GPS has become reasonably stable. The code running on the polling thread looks like this:
-(void)observeForGPSStabilization:(AGSLocationDisplay *)locationDisplay;
{
dispatch_async(gpsStabilizerQueue, ^(void){
BOOL stable = NO;
while (!stable) {
stable = [self isStabilized:locationDisplay.location.point];
}
[self performSelectorOnMainThread:@selector(notifyOfStabilization:) withObject:locationDisplay.location.point waitUntilDone:NO];
});
}
-(BOOL)isStabilized:(AGSPoint *)point;
{
if(point == nil) //if we are not getting a point yet, the GPS has not even started tracking
{
return NO;
}
else {
if(CurrentDelta(point, lastGPSPoint) < maxStableDelta) //this macro calculates whether we are under an acceptable drift
{
return YES;
}
else {
lastGPSPoint = point;
return NO;
}
}
} Since you are still on 2.3, you will need to modify that slightly to feed off of an AGSGPS object. The maxStableDelta value is quite high, equivalent to moving at several hundred meters per second. I've found that the initial GPS jumping can sometimes be hundreds of miles per update, or more.
... View more
04-05-2013
01:01 PM
|
0
|
0
|
337
|
POST
|
I use a unique value renderer and a graphics layer in my map. The UVR symbolizes my graphics correctly, however when I add a simple info template delegate to each of my graphics in it's initializer tapping (or clicking) in simulator does not fire: ... I add the info template like this to my graphics. Record is a simple object I use to encapsulate data. Note that my template is added to a local mutable array of template object so as to be retained. When the app starts up the points are displayed correctly, but tapping on the graphics doesn't do anything. What am I doing wrong? Apologies for asking the obvious, but are you sure you are instantiating the NSMutableArray that retains your templates before it is being used? XCode gives you no instant, compile, or run time warning if you are attempting to call a nil object, and calling addObject: on an uninitialized NSMutableArray will not cause a crash, but will cause the same memory management issues that would arise from not adding the object to the array. I ask because I recently had to solve the issue you describe (callouts not displaying and callout-related callbacks not occurring). I had initially missed the weak property assign on infoTemplateDelegate, so my first attempted fix was to retain the template objects in an array, like you are doing. On my first test of this fix, the problem persisted for one possible workflow, which was perplexing until I realized that my overarching class had two initialization methods and I was only initializing the retainer array in one of them. I am confused as to how the AGSMapViewCalloutDelegate and the Graphics's infoTemplateDelegate work together. Does this have anything to do with passing in a nil symbol and allowing the renderer to symbolize the graphics? I've read the docs and it doesn't appear to say anything about this. I don't think the use of a renderer vs. an assigned symbol has any effect other than how the symbol is eventually drawn in the OpenGL layer. This is based on the knowledge that that graphics are all rendered flat to one layer; to the OpenGL kit and Cocoa Touch processing, they are all part of a flat sheet. Presumably, some other code, independent of the rendering code, is checking whether the geometries of the AGSGraphic objects fall within the current touch.
... View more
04-03-2013
02:11 PM
|
0
|
0
|
209
|
POST
|
Actually, the AGSLocationDisplayInfoTemplateDelegate lets you customize the callout that is displayed when you tap the location indicator on the map. I would like to customize the location indicator itself. Jeff My mistake. If you want to replace the default indicator graphics, you could move a copy of the bundle into your app directory, point to that bundle, open it with ctrl-click->Show Package Contents, and then replace the LocationDisplay___.png files with different graphics. I think that clean blue marker symbol is drawn on the fly if the LocationDisplay graphics / the bundle cannot be accessed, so the code for that drawing would be buried in the SDK.
... View more
04-01-2013
03:21 PM
|
0
|
0
|
290
|
POST
|
. - there is a logout button .. if the user click it the application will crash .. and that's it .. Thank you in advance .. Faisal, Is there a reason you are not using Automatic Reference Counting (ARC)? I could not pinpoint your exact problem, but it has all the signs of a memory management issue. Also, you are not doing a bunch of memory management within your MapViewController class that should be done in a non-ARC project. I actually did not realize that you are not using ARC until I noticed that you have a - (void)dealloc in place. The crash disappeared after I converted your test project to ARC, which you can do within XCode by selecting Edit->Refactor->Convert to Objective-C ARC. I attached the converted project. If you don't want to use ARC, you need to explicitly release all objects you create when you no longer need them. In your original, non-ARC code, a number of members of your MapViewController class are never being released.
... View more
03-27-2013
10:37 AM
|
0
|
0
|
368
|
POST
|
I did have a comment: shouldn't we update the cancelRequestForKey: function to use the local requestQueue object and not the sharedOperationQueue? Seems like we may be putting operations into one queue and canceling them from another. Yes, I missed that. All queue interactions should now point to the NSOperationQueue instance. Glad I could help. You might mark the thread as answered if this turns out to be workable after further testing.
... View more
03-22-2013
10:03 AM
|
0
|
0
|
362
|
POST
|
Good morning, Can someone please take a look at this and get back to me ASAP? I've been delaying delivering an application based what appeared to be new functionality in 10.1.1 and not I'm stuck between a rock and a hard place. Thanks, Jon I'm not ESRI, but I saw the same crash when I looked at the custom tiled layer sample and I was able to find a quick workaround to the crash. [AGSRequestOperation sharedOperationQueue] simply returns a subclass of NSOperationQueue. If you create an NSOperationQueue and substitute that for the sharedOperationQueue call, everything runs smoothly. I'm not sure what kind of operation throttling, etc. sharedOperationQueue normally does in response to other stuff going on with the Runtime SDK, but I saw no difference in behavior of the sample app, except that the intermittent crashing went away. If you need to ship this ASAP, probably worth a shot. I attached an edited version of the sample, with sharedOperationQueue swapped out for an NSOperationQueue. Prior to swapping out the queues, I was seeing crash on layer load about 30% of the time. After swapping, I built, ran, and interacted with the modified sample 12 times and saw no crashing or other issues.
... View more
03-22-2013
09:22 AM
|
0
|
0
|
362
|
POST
|
I'm using the ESRI World Street Map as my basemap tiled layer. Then I load our tiled layer next. This works just fine except our layer has 2 extra layers that allows a user to zoom into a parcel even more than ESRI's World Street Map. I can not zoom to the extra 2 levels when the ESRI World Street Map is the basemap layer. Any ideas? I'm using the V10.1.1 iOS SDK. Jerry The first layer you add defines certain values, including the minimum and maximum zoom of the map. This zoom limiting is undocumented behavior of AGSMapView, but pretty standard behavior of ESRI's map classes across the various SDKs/APIs. You should be able to solve this by adding your tiled layer first, and then inserting the world street map under it. You may want to write some code to zoom the map out to the closest scale of the World Street Map if your user leaves the extent of your tiled service.
... View more
03-21-2013
01:19 PM
|
0
|
0
|
166
|
POST
|
What I have tried thus far does seem to be going against the grain. My proof of concept uses an instance of CALayer that I create and add as a sub-layer of the CAEAGLLayer used by AGSMapView. The behavior is quite poor due to the high latency on state change notifications from the AGSMapView object. My custom layer always lags way behind during panning and zooming. My real goal is to use an OpenGL texture to provide the visualization, but that would still have the same zooming and panning problems that I have with my trivial CALayer usage. I get the feeling that some sort of low level drawing hook into the CAEAGLLayer of the map view is what I would need to get the best results, but I do not see a way to make that happen. Yeah, that is the same limitation I ran into playing with the 2.3 SDK. I had some luck making the custom layer (UIView in my case) transparent between an extent changing user gesture and the eventual mapViewDid_____ notification. However, this looked pretty awful; it's been years since your average web/mobile map had to suspend drawing while changing extent and there was sometimes still a moment of the render for the previous extent showing up.
... View more
03-19-2013
08:01 AM
|
0
|
0
|
364
|
POST
|
The wrinkle here is that I am receiving the data from an external source as it is read from various sensors. It is not coming from ArcGIS Server or from any mapping service. It sounds as though I need a custom subclass of AGSDynamicLayer that renders the density representation one way or another. Is that reasonable? Interesting. To my knowledge, the various ArcGIS Runtime SDKs leave rendering of actual map tiles to backing map services. Only discreet geometries/graphics are rendered client-side. So, if not for your custom service, it would seem like the AGSFeatureLayer / AGSDynamicMapServiceLayer switching would be the way to go. In the 2.3 SDK, where layers were rendered within a hierarchy of UIViews inside AGSMapView, I have a hunch that you could: Subclass AGSDynamicLayer Override the drawing code for the UILayer associated with the UIView that represents the AGSDynamicLayer in the AGSMapView. Write your own tile image generator (a lot of work!) to perform the drawing in the overridden UILayer from 2). This would involve use of undocumented API's and would probably be difficult to perfect since the AGSMapView does a lot of resizing of its internal components that you are not able to access or override. You would have to basically work with the private methods/components you figure out and around the ones you don't know and/or cannot override. It might be functional, but it will probably be a messy hack behind the scenes. Unfortunately, with the switch to OpenGLES rendering in 10.1.1, access to the individual components of an AGSMapView is no longer possible; everything is being rendered into an OpenGLES window. The ESRI devs will obviously know more than I do, but I do have some experience with the SDK. My two cents is that the subclass you are thinking of will have to work against some of the basic conventions/architectural choices of the SDK and that you want to either: Figure out a clustering algorithm that will allow you to represent graphics in aggregate at larger scales. This does not get you a true density map but will allow the user to view clusters of graphics at larger scales. Figure out a way to feed your external map service into an ESRI service. Assuming, of course, that you have the license to set up and use such a service.
... View more
03-18-2013
12:17 PM
|
0
|
0
|
364
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|