Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15772] Map Annotation w/ Custom Image not Draggable

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam
ReporterAaron Benzick
AssigneeUnknown
Created2013-11-07T04:58:28.000+0000
Updated2018-02-28T20:04:18.000+0000

Description

Problem Description

If you have a Map View and add an annotation that has the "image" variable set with a custom image icon instead of a built in pin and you also have "draggable" set to true, you can not drag the pin around. If you drag the pin around on the map it will pick it up and let you drag it to a new location. However, if you then drag the map around (not the pin) the annotation is locked into a pixel location on your screen and doesn't move with the map. It is not locked into a GPS location on the Map View.

Extra information

Here is a link to a video showing the bug in action: https://www.dropbox.com/s/ww0yqy7mmkmkp7v/annotation_image.mov

Steps to reproduce

1. Create a new project 2. Paste test code in app.js
var win = Ti.UI.createWindow();
 
var mountainView = Titanium.Map.createAnnotation({
    latitude : 37.390749,
    longitude : -122.081651,
    title : "Appcelerator Headquarters",
    subtitle : 'Mountain View, CA', 
    draggable  : true, 
    image  : '/images/pin.png',
});
 
var mapview = Titanium.Map.createView({
    mapType : Titanium.Map.STANDARD_TYPE,
    region : {
        latitude : 37.390749,
        longitude : -122.081651,
        latitudeDelta : 0.04,
        longitudeDelta : 0.04
    },
    animate : true,
    regionFit : true,
    userLocation : true,
    annotations : [mountainView]
});
 
win.add(mapview);
  
win.open();
3. Now run on iOS 7 with simulator 7.0 4. Randomly Click on map and annotation 5. Now, drag the pin around the map. Next, drag the map view around

Discussions

Q&A Question Link: http://developer.appcelerator.com/question/159186/

Attachments

FileDateSize
annotation_image.mov2013-11-07T04:58:28.000+00005601781

Comments

  1. Aaron Benzick 2013-11-18

    This is a mission critical bug for my app. Any updates on this?
  2. Rainer Schleevoigt 2014-08-10

    I have the same issue. But I think there is a workaround: After dragend you can remove and add new annotation

JSON Source