cyohman

AGSLocator, AGSLocatorDelegate, AGSAddressCandidate.. Tutorial

Discussion created by cyohman on Mar 30, 2010
Latest reply on Apr 13, 2010 by njarecha-esristaff
AGSSpatialReference, & AGSPoint Tutorial Version 1.03.30.2010 (sorry, I use versioning numbers that make sense to me :])

Questions/Comments

1) This code is far from perfect. Memory leaks, etc. may be present. If you see something wrong, then please try to fix it and let me know.

2) I welcome someone to GUI-ify this. Right now, I'm traversing the object model. Either someone can wrap this with a GUI, or I'll do it later.

3) I've only been coding in Objective-C for 3 months now, but it seems the documentation should make it clear to beginners that init* methods can only be used on [AGS* alloc]. See code for examples in viewDidLoad in AGSAddressCandidateViewController.m, e.g. line 44.

4) Why does AGSPoint lack a spatial reference property? It would be helpful, if that or AGSLocator had a spatial reference. This way programmers would know the projection of coordinates coming back to them. Plus, IPoint in the ArcObjects model has a spatial reference property.

5) Why is there a difference in precision between the x & y properties of AGSPoint and its CGPoint property's x & y properties? Please see lines 75-79 of AGSAddressCandidateViewController.m .

6) I've brought this up before, but it looks like AGSAddressCandidate's attributes property has replaced the address property. Address's count is 0 for any AGSAddressCandidate I have seen, while attribute's count is non-zero. I take that back. The above is true for AGSAddressCandidates returned from locationsForAddress calls, while the reverse appears true for addressForLocation calls. Can anyone explain why there is a difference?

Thanks for reading and any responses you may have. :)

Attachments

Outcomes