Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8861] Android: Maps V2 module - Drag and drop map pin annotations

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-03-21T22:28:43.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2013 Sprint 06 API, 2013 Sprint 06, Co-3.1.0
ComponentsAndroid
Labelsapi, module_googlemapv2, module_map, parity, qe-testadded
ReporterVishal Duggal
AssigneePing Wang
Created2012-04-23T12:13:21.000+0000
Updated2013-08-09T09:33:28.000+0000

Description

iOS has the feature to drag and drop annotations on a MAP. Android needs similar functionality.

Comments

  1. Mihai Lan 2012-07-11

    This would be a very useful feature for the Android phones!
  2. Michael Belkin 2012-09-12

    Any idea on when this will be completed? I'm working on an app that requires this and we can't begin until we have drag and drop functionality on both platforms...
  3. Ping Wang 2013-03-15

    PR: https://github.com/appcelerator/titanium_modules/pull/92 Test case:
       var MapModule = require('ti.map');
       
       var win = Ti.UI.createWindow({fullscreen: false});
       var anno = MapModule.createAnnotation({latitude: -33.87365, image: 'KS_nav_ui.png', longitude: 151.20689, title: "Drag Me", subtitle: "Sydney is quite chill", draggable: true});
       var anno2 = MapModule.createAnnotation({latitude: -33.86365, pincolor: MapModule.ANNOTATION_BLUE, longitude: 151.21689, title: "Drag Me 2", subtitle: "This is anno2", draggable: true});
       var anno3 = MapModule.createAnnotation({latitude: -33.85365, longitude: 151.20689, title: "anno3", subtitle: "This is anno3", draggable: false});
       
       var map = MapModule.createView({
       	userLocation: true,
       	mapType: MapModule.NORMAL_TYPE,
       	animate: true,
       	annotations: [anno, anno2, anno3],
       	region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 }, //Sydney
       	top: '30%'
       });
       
       map.addEventListener('pinchangedragstate', function(e) {
       	Ti.API.info(e.title + ": newState=" + e.newState + ", lat=" + e.annotation.latitude + ", lon=" + e.annotation.longitude);
       });
       
       var b = Ti.UI.createButton({
       	title: "Toggle draggable for anno3",
       	top: 0
       });
       b.addEventListener('click', function(){
       	anno3.draggable = !anno3.draggable;
       	Ti.API.info("anno3.draggable = " + anno3.draggable);
       });
       
       win.add(b);
       win.add(map);
       win.open();
       
    For FR: 1. Run the above test case 2. Drag the annotation "Drag Me" and "Drag Me 2" and check the log. 3. Click the button to toggle the draggable property for anno3. Drag anno3 and check the log.
  4. Dharmik Patel 2013-08-09

    Thats not working on Titanium SDK 3.1.0.GA and 3.1.1.GA.

JSON Source