[TIMOB-8862] MobileWeb: Drag and drop map pin annotations
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Closed |
| Resolution | Done |
| Resolution Date | 2017-06-28T23:42:13.000+0000 |
| Affected Version/s | Release 2.0.1 |
| Fix Version/s | n/a |
| Components | MobileWeb |
| Labels | api, parity |
| Reporter | Vishal Duggal |
| Assignee | Chris Barber |
| Created | 2012-04-23T12:15:01.000+0000 |
| Updated | 2017-06-28T23:42:13.000+0000 |
Description
IOS has the feature to drag and drop annotations on a MAP. MobileWeb needs similar functionality.
Test Code
var win = Ti.UI.createWindow({}); var mountainView = Titanium.Map.createAnnotation({ latitude:37.390749, longitude:-122.081651, title:"Movable Annotation", subtitle:'draggable:true', 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); Ti.API.info("Latitude " + evt.annotation.latitude + " Longitude "+evt.annotation.longitude); }); win.open();Closing ticket as fixed, please refer to TIMOB-1242.