[TIMOB-9332] iOS: Map - Add centerOffset property to Ti.Map.Annotation
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-07-02T22:51:53.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | 2013 Sprint 14, 2013 Sprint 14 API, Release 3.1.2, Release 3.2.0 |
Components | iOS |
Labels | module_map, qe-testadded |
Reporter | Jose Carlos Andreu |
Assignee | Vishal Duggal |
Created | 2012-05-31T11:44:04.000+0000 |
Updated | 2013-07-29T09:29:16.000+0000 |
Description
Add centerOffset property to a custom annotation to be able to set a x & y offset to the image of the annotation.
Right now the center of the annotation is the center of the image size. This makes that some images appear not to be in their proper place at certain zoom levels.
Reference to official documentation: http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008207
I have already coded the feature and I open this ticket in order to get the pull request accepted.
I asked for a pull request: https://github.com/appcelerator/titanium_mobile/pull/2304
I provide a simple test case to check it's working. When centerOffset is used the bottom end of the pin should be in the (0,0). I added the route to have some reference to check that the annotation is being moved when using the property.
@Jose - we will get to this PR shortly.
I updated the code in github. No one is assigned at the moment. Do I have to notify someone?
@Jose - we are in the middle of a release (2.1.0) and hence the delay. We will get to this PR next week.
Any update on this? It's a fairly minor mod. This functionality is a relative necessity for anyone utilizing custom annotation images. The only current workaround is to create a pin image with 50% additional area transparent to give the appearance of the annotation in the correct position.
I have corrected this for v3.0.2 and have it working and verified on iOS. @Julian you can copy these files to your own SDK on your local machine. (Usually located at ~/Library/Application Support/Titanium/mobilesdk/osx/
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4433
Test Case
Backport to 3_1_X https://github.com/appcelerator/titanium_mobile/pull/4491
Updated label. Closing as Fixed. Verified with: Studio: 3.1.2.201307261628 SDK: 3.1.2.v20130726192706 acs:1.0.4 alloy:1.2.0-alpha titanium:3.1.1 titanium-code-processor:1.0.2-alpha OS: OSX 10.8.4 Device: ipad mini(v6.0) Xcode:4.6.3 centerOffset property to Ti.Map.Annotation working well.