Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1242] iOS: Drag and drop map pin annotations

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-23T12:18:33.000+0000
Affected Version/sRelease 1.7.2, Release 2.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-09 API
ComponentsiOS
Labelsapi, dr-list, qe-testadded
ReporterRoger Chapman
AssigneeNeeraj Gupta
Created2011-04-15T02:47:30.000+0000
Updated2012-06-07T11:38:06.000+0000

Description

MKAnnotationView has support for allowing a map annotation to be draggable (in iOS 4).
Boolean property on Annotation object - draggable:true/false
Add associated Events - e.g. DragStart & DragEnd etc.

Comments

  1. yury 2011-04-15

    blocking feature

  2. yury 2011-04-15

    Fix in pull request https://github.com/appcelerator/titanium_mobile/pull/53">https://github.com/appcelerator/titanium_mobile/pull/53
    Currently iOS >= 4.0 only.

  3. examp 2011-04-15

    Is this confirmed to work? I just tested it and the demo does not work in simulator or iphone 4 OS4.3. SDK 4.2, Titanium 1.6

  4. Borming 2011-04-15

    Works in 1.6.0 with yury fix, but not in 1.6.1

    Any news on this feature, our project depends on it.

  5. Aaron K. Saunders 2011-07-15

    wondering what it is going to take to get some movement on this issue
  6. Anirudh Nagesh 2011-08-12

    Associated Helpdesk ticket

    http://support-admin.appcelerator.com/display/10619
  7. Paul Dowsett 2011-12-02

    Reassigning this ticket with several watchers, due to Reggie's absence.
  8. Kevin Whinnery 2012-01-17

    Community pull request is https://github.com/appcelerator/titanium_mobile/pull/1193 As of today still needs: - Code review - docs - tests
  9. Onur YALAZI 2012-01-30

    I've written android drag/drop annotation support on github. But I think it's still buggy and colliding with onTap events. Could anybody review the code and give ideas to work out it's problems? the diff is at: https://github.com/fsniper/titanium_mobile/commit/a29b1c858161ff54d9aaad10c0c90a7bb1ff653e
  10. Nikolai Derzhak 2012-02-06

    This issue latest notification was not sent due to JIRA mail setting. Fixed now. Please check the issue for latests changes.
  11. Rafael Kellermann Streit 2012-02-09

    I made this pull request: https://github.com/appcelerator/titanium_mobile/pull/1193 Why didn't was accepted yet? :-(
  12. Neeraj Gupta 2012-02-09

    This pull request has been scheduled to be reviewed in next 2 weeks.
  13. Rafael Kellermann Streit 2012-02-10

    Nice, thanks Neeraj! :-)
  14. Rafael Kellermann Streit 2012-02-10

    Just one observation: Since I made that pull request, some files were changed (TiMapView.h, for example). But, if you put my different lines in the new file, will work fine.
  15. Neeraj Gupta 2012-02-14

    Estimated effort includes defining and implementing the same behavior on both iOS and Android platforms.
  16. MAIRDUMONT GmbH & Co. KG 2012-02-15

    Hello Neeraj or Rafael, a question to better understand this feature: Will one result of drag&dropping the map pin annotation be the geocode of the new location visualized by the pin? I imagine the annotation's properties latitude and longitude then will be updated so one can use them for let's say forward geocoding or so.
  17. Rafael Kellermann Streit 2012-02-15

    Hello MAIRDUMONT, Yes, the latitude/longitude of annotation will be updated when the user drag&drop the annotation. The user have to click in the annotation by 1 second and drop in another place. Then, the annotation will have the latitude/longitude from the other place. :-)
  18. Rafael Kellermann Streit 2012-02-23

    Neeraj, is missing something to apply this PR? Thanks,
  19. Neeraj Gupta 2012-02-23

    @Rafael - we are a little behind processing these pull requests. We hope to get to your pull request in a week or so.
  20. Neeraj Gupta 2012-03-09

    This PR only covers iOS functionality so we need to design and implement the same functionality for Android and Mobile Web platforms. We will process this PR once we scope it out for all platforms.
  21. Rafael Kellermann Streit 2012-03-14

    I made a new pull request to it. Link: https://github.com/appcelerator/titanium_mobile/pull/1670
  22. Vishal Duggal 2012-04-17

    Test Code
        
        var win = Ti.UI.createWindow({});
        
        var mountainView = Titanium.Map.createAnnotation({
            latitude:37.390749,
            longitude:-122.081651,
            title:"Appcelerator Headquarters",
            subtitle:'Mountain View, CA',
            pincolor:Titanium.Map.ANNOTATION_RED,
            animate:true,
            draggable:true,
            leftButton: '../images/appcelerator_small.png',
            myid:1 // Custom property to uniquely identify this annotation.
        });
         
        var mapview = Titanium.Map.createView({
            mapType: Titanium.Map.STANDARD_TYPE,
            region: {latitude:37.39, longitude:-122.08, 
                    latitudeDelta:0.01, longitudeDelta:0.01},
            animate:true,
            regionFit:true,
            userLocation:true,
            annotations:[mountainView]
        });
         
        win.add(mapview);
        
        mapview.addEventListener('pinchangedragstate', function(evt) {
         
            Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid+" Old State "+evt.oldState+" New State "+evt.newState);
        });
        
        win.open();
        
  23. Rafael Kellermann Streit 2012-04-19

    The code was accepted: https://github.com/appcelerator/titanium_mobile/pull/1670. Can this feature enter in the SDK 2.0?
  24. Vishal Duggal 2012-04-23

    PR merged for IOS. Tickets created for Android, MobileWeb and documentation
  25. Natalie Huynh 2012-06-07

    Tested with 2.1.0.v20120606162652 on iPod 3rd gen 4.0.2 and iPad Sim 5.0

JSON Source