function tileUrlFunction(tileCoord) {
  return ('https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' +
      '{z}/{x}/{y}.vector.pbf?access_token=' + key)
    .replace('{z}', String(tileCoord[0] * 2 - 1))
    .replace('{x}', String(tileCoord[1]))
    .replace('{y}', String(tileCoord[2]))
    .replace('{a-d}', 'abcd'.substr(
      ((tileCoord[1] << tileCoord[0]) + tileCoord[2]) % 4, 1));
}
function tileUrlFunction(tileCoord) {
  return ('https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' +
      '{z}/{x}/{y}.vector.pbf?access_token=' + key)
    .replace('{z}', String(tileCoord[0] * 2 - 1))
    .replace('{x}', String(tileCoord[1]))
    .replace('{y}', String(tileCoord[2]))
    .replace('{a-d}', 'abcd'.substr(
      ((tileCoord[1] << tileCoord[0]) + tileCoord[2]) % 4, 1));
}
function tileUrlFunction ( tileCoord ) { return ( 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + '{z}/{x}/{y}.vector.pbf?access_token=' + key ) . replace ( '{z}' , String ( tileCoord [ 0 ] * 2 - 1 ) ) . replace ( '{x}' , String ( tileCoord [ 1 ] ) ) . replace ( '{y}' , String ( tileCoord [ 2 ] ) ) . replace ( '{a-d}' , 'abcd' . substr ( ( ( tileCoord [ 1 ] << tileCoord [ 0 ] ) + tileCoord [ 2 ] ) % 4 , 1 ) ) ; }
Calculation of tile urls for zoom levels 1, 3, 5, 7, 9, 11, 13, 15.
Calculation of tile urls for zoom levels 1 3 5 7 9 11 13 15 .
Returns a url function for a tile