example/bezier/polymaps.js
function touchstart(e) {
    var i = -1,
        n = e.touches.length,
        t = Date.now();

    // doubletap detection
    if ((n == 1) && (t - last < 300)) {
      var z = map.zoom();
      map.zoomBy(1 - z + Math.floor(z), map.mouse(e.touches[0]));
      e.preventDefault();
    }
    last = t;

    // store original zoom & touch locations
    zoom = map.zoom();
    angle = map.angle();
    while (++i < n) {
      t = e.touches[i];
      locations[t.identifier] = map.pointLocation(map.mouse(t));
    }
  }
function touchstart(e) {
    var i = -1,
        n = e.touches.length,
        t = Date.now();

    // doubletap detection
    if ((n == 1) && (t - last < 300)) {
      var z = map.zoom();
      map.zoomBy(1 - z + Math.floor(z), map.mouse(e.touches[0]));
      e.preventDefault();
    }
    last = t;

    // store original zoom & touch locations
    zoom = map.zoom();
    angle = map.angle();
    while (++i < n) {
      t = e.touches[i];
      locations[t.identifier] = map.pointLocation(map.mouse(t));
    }
  }
function touchstart ( e ) { var i = - 1 , n = e . touches . length , t = Date . now ( ) ; // doubletap detection if ( ( n == 1 ) && ( t - last < 300 ) ) { var z = map . zoom ( ) ; map . zoomBy ( 1 - z + Math . floor ( z ) , map . mouse ( e . touches [ 0 ] ) ) ; e . preventDefault ( ) ; } last = t ; // store original zoom & touch locations zoom = map . zoom ( ) ; angle = map . angle ( ) ; while ( ++ i < n ) { t = e . touches [ i ] ; locations [ t . identifier ] = map . pointLocation ( map . mouse ( t ) ) ; } }
touch identifier -> location
touch identifier - > location