@@ -0,0 +1,2280 @@
+package com.cocoahero.android.gmaps.addons.mapbox;%0A%0Aimport java.net.MalformedURLException;%0Aimport java.net.URL;%0Aimport java.util.Random;%0A%0Aimport com.google.android.gms.maps.model.UrlTileProvider;%0A%0Apublic class MapBoxOnlineTileProvider extends UrlTileProvider %7B%0A%0A    private static final String%5B%5D FORMATS;%0A%0A    static %7B%0A        String%5B%5D servers = new String%5B%5D %7B %22a%22, %22b%22, %22c%22, %22d%22 %7D;%0A        String%5B%5D formats = new String%5Bservers.length%5D;%0A        for (int i = 0; i %3C servers.length; i++) %7B%0A            formats%5Bi%5D = String.format(%22%25%25s://%25s.tiles.mapbox.com/v3/%25%25s/%25%25d/%25%25d/%25%25d.png%22, servers%5Bi%5D);%0A        %7D%0A        FORMATS = formats;%0A    %7D%0A%0A    // ------------------------------------------------------------------------%0A    // Instance Variables%0A    // ------------------------------------------------------------------------%0A%0A    private String mMapIdentifier;%0A    private boolean mUseSSL;%0A%0A    // ------------------------------------------------------------------------%0A    // Constructors%0A    // ------------------------------------------------------------------------%0A%0A    public MapBoxOnlineTileProvider(String mapIdentifier) %7B%0A        this(mapIdentifier, false);%0A    %7D%0A%0A    public MapBoxOnlineTileProvider(String mapIdentifier, boolean useSSL) %7B%0A        super(256, 256);%0A%0A        this.mMapIdentifier = mapIdentifier;%0A        this.mUseSSL = useSSL;%0A    %7D%0A%0A    // ------------------------------------------------------------------------%0A    // Public Methods%0A    // ------------------------------------------------------------------------%0A    %0A    public String getMapIdentifier() %7B%0A        return this.mMapIdentifier;%0A    %7D%0A    %0A    public void setMapIdentifier(String anIdentifier) %7B%0A        this.mMapIdentifier = anIdentifier;%0A    %7D%0A    %0A    public boolean isSSLEnabled() %7B%0A        return this.mUseSSL;%0A    %7D%0A    %0A    public void setSSLEnabled(boolean enableSSL) %7B%0A        this.mUseSSL = enableSSL;%0A    %7D%0A%0A    @Override%0A    public URL getTileUrl(int x, int y, int z) %7B%0A        String f = FORMATS%5Bnew Random().nextInt(FORMATS.length)%5D;%0A        String p = this.mUseSSL ? %22https%22 : %22http%22;%0A        try %7B%0A            return new URL(String.format(f, p, this.mMapIdentifier, z, x, y));%0A        %7D%0A        catch (MalformedURLException e) %7B%0A            return null;%0A        %7D%0A    %7D%0A%0A%7D%0A

Add MapBoxOnlineTileProvider