Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9403] Android: Map - Add centerOffset property to Ti.Map.Annotation

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-07-11T03:42:09.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 6.0.0
ComponentsAndroid
Labelsapi, parity
ReporterJose Carlos Andreu
AssigneeAshraf Abu
Created2012-06-05T15:12:16.000+0000
Updated2016-09-09T00:17:38.000+0000

Description

This is the parity ticket for Android to see if such functionality can be ported over. ------ 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.

Comments

  1. Imraan Jhetam 2014-03-26

    Any idea when this will be completed?
  2. Vincent Degroote 2014-08-20

    Any improvement on this? I think it could be achieve using the setAnchor method of the google Maps v2 Marker object: http://developer.android.com/reference/com/google/android/gms/maps/model/Marker.html#setAnchor(float, float)
  3. Ketan Majmudar 2015-02-26

    Any movement on this at all? The ability to offset a custom view annotation would make the use of maps much more aligned. I'm currently struggling with brand guidelines and issues within the organisation and its just another android concession we are having to explain. I'm not sure if this feature or ability is available from the Google Maps V2 API directly if it were coded natively? Either way, an update here would be appreciated.
  4. Ketan Majmudar 2015-02-26

    Vincent, Marker Anchor sounds exactly like its a required option, to keep parity. If using pins we would need to use 50% from left and bottom of the image, if using a custom centred image, the anchor should be set. I think this should become fairly high priority and looked asap if possible.
  5. Joseph Sachs 2015-06-24

    +1 this is the second App I develop which Android Annotation image has to be aesthetically different than annotation of iOS. Android needs this nifty feature :)
  6. Sergey Nosenko 2016-06-21

    +1 for merge the pull request
  7. Ashraf Abu 2016-07-05

    The PR: https://github.com/appcelerator-modules/ti.map/pull/79
  8. Ashraf Abu 2016-07-11

    PR merged.
  9. Lokesh Choudhary 2016-09-09

    Verified the implementation. Closing. Environment: Appc Studio : 4.8.0.201609061702 Ti SDK : 6.0.0.v20160908065418 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.8-6 Appc CLI : 6.0.0-38 Node: 4.4.4 Nexus 6 : Android 6.0.1 Android Map Module : 3.0.0

JSON Source