Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1398] Ti.Map Module Annotation Click Event Not Firing

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNot Our Bug
Resolution Date2016-02-12T20:08:28.000+0000
Affected Version/sAppcelerator Studio 4.4.0
Fix Version/sn/a
ComponentsStudio, Titanium SDK & CLI
Labelsn/a
ReporterTaylor Thompson
AssigneeRadamantis Torres-Lechuga
Created2016-02-11T15:45:04.000+0000
Updated2016-03-08T07:37:49.000+0000

Description

We have a developer who is using the Ti.Map Module to display a map with a route drawn onto it. On that route, there are annotation points that are clickable to bring up an option which can then be clicked. Today our developer noticed that the annotation click event it no longer firing and no code changes have been made. This issue is present on multiple devices which have various versions of iOS and which have not been updated recently. All we can figure is that it seems to be a service issue that is conflicting with the event because no code changes have been made. Code snippet below: //////////////////////////////////// "#mapview": { mapType: Alloy.Globals.Map.HYBRID_TYPE, top: '50dp', width: Ti.UI.FILL, height: Ti.UI.FILL, animate: true, regionFit: true, userLocation: false, region: { latitude: 38.980279, longitude: -87.395528, latitudeDelta: 6.0, longitudeDelta: 6.0 } } ///////////////////////////////////////////////////// var routePts = []; var meterPts = []; var csPts = []; $.mapview.addRoute(Alloy.Globals.Map.createRoute({ name: 'myroute', width: 4.0, color: '#f00', points: routePts })); }; //this is where the annotations are created meterPts.push({ drn: stDRN, mile_post: 0, role_id: stRole, latitude: lat, longitude:lon, title: stName, subtitle: ' Lat: ' + lat + ' Lon: ' + lon, animate: true, pincolor: Alloy.Globals.Map.ANNOTATION_GREEN, rightButton: Ti.UI.iPhone.SystemButton.CONTACT_ADD, image:stType }); //Add annotations to the map $.mapview.addAnnotations(meterPts); /* var routePoints = [ {latitude:36.38, longitude:-86.190523}, {latitude: 36.650986,longitude: -86.583497}, {latitude: 38.980279,longitude: -87.395528}, {latitude: 39.6149953,longitude: -87.6857934}, {latitude: 39.9262,longitude: -87.7077}, {latitude:40.261635, longitude:-87.821192}, {latitude: 40.767755,longitude: -87.9447189}, {latitude:41.462750, longitude:-88.176884} ]; $.mapview.addRoute(Alloy.Globals.Map.createRoute({ name: 'myroute', width: 3.5, color: '#f00', points: routePoints })); */ function report(evt){ if ( evt.clicksource == 'rightButton') { var drn_nb = evt.annotation.drn; var title = evt.annotation.title; var mile_post = evt.annotation.mile_post; var role_id = evt.annotation.role_id; var company = 'MGT'; var pipeline_data = {'company':company, 'drn_nb':drn_nb, 'drn_name':title, 'mile_post':mile_post, 'role_id':role_id}; var locationDetail = Alloy.createController('locationDetail', pipeline_data).getView(); $.mgt.open(locationDetail); } } };

Comments

  1. Taylor Thompson 2016-02-11

    This can now be closed, the issue has been resolved. It was due to an internal web service change that was made without our knowledge.

JSON Source