Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1485] TiAPI: Unable to set offset when using custom pins on mapview

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionWon't Do
Resolution Date2020-02-12T13:31:28.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsTiAPI
Labelsapi
ReporterMatthew Lieder
AssigneeRene Pot
Created2011-04-15T02:54:04.000+0000
Updated2020-02-12T13:31:29.000+0000

Description

So ticket #1197 added support for custom pin images on mapviews, which works awesome. However, there's currently no way to set the centerOffset which means that the top of the image is always aligned with the point on the map. That might work well for some custom pin images, but if I actually use an image of a pin for the custom pin image (imagine that :p) then the offset is wrong. If I zoom in on it I see the head of the pin is attached to the point on the map rather than the base of the pin (which is what should be).

The solution is pretty simple, if http://stackoverflow.com/questions/1185611/mkpinannotationview-are-there-more-than-three-colors-available/2945217#2945217"> http://stackoverflow.com/questions/1185611/mkpinannotationview-are-... is correct: you just need to allow us to set MKAnnotationView.centerOffset when using a custom image. Could this be included in 1.5.0?

(I'm a subscriber)

Comments

  1. MAIRDUMONT GmbH & Co. KG 2012-02-10

    Agree with Matthew. From a design view you are very restricted if it is not possible to set a pixel offset to an annotation. Please consider implementing this property. I'm sure not only Matthew and me want to use asymmetric images.
  2. Rene Pot 2020-02-12

    is already implemented https://docs.appcelerator.com/platform/latest/#!/api/Modules.Map.Annotation-property-centerOffset

JSON Source