Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28527

iOS: "ti.map" polyline click events not working if it only has 2 points

    Details

    • Story Points:
      7

      Description

      Weird one. Check the following test case and click on the polyline:

      var Map = require('ti.map');
       
      var win = Ti.UI.createWindow();
       
      var polyline1 = Map.createPolyline({
          points: [{
                  latitude: -33.884717,
                  longitude: 151.187993
              },
              [151.203099, -33.882152], // Remove this line and it won't work anymore
              {
                  latitude: -33.886783,
                  longitude: 151.218033
              }
          ],
          strokeColor: '#FF0000',
          strokeWidth: 4
      });
       
      var map = Map.createView({
          region: {
              latitude: -33.87365,
              longitude: 151.20689,
              latitudeDelta: 0.05,
              longitudeDelta: 0.05
          }
      });
       
      map.addPolyline(polyline1);
       
      win.add(map);
       
      map.addEventListener('click', function(e) {
          Ti.API.info('Click Event: ' + JSON.stringify(e));
      });
       
      win.open();
      

      It works great! Now remove the second coordinate point ([151.203099, -33.882152]) and try again: The click event is not fired anymore. And even with the three points, it only fires when tapped into certain regions, which is also very odd.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Gary Mathews
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration