title: Blurred custom tiles on Android Maps V2
body: <p>I want to show a CustomOverlay on a Google Maps V2. The loading of the tiles works as expected, the only thing is, that the shown tiles are not appearing to be sharp at all, kind of blurry. Google did not get me to an usable answer.</p>
  
  <p>I took the approach of adding classical 256px x 256px tiles for the TileProvider. I managed to get a tile source where the images were @2x (retina), which made the whole visual experience much sharper, but I would rather not use this source, as the data transfer rate is four times higher, hence not usable on mobile devices and slow internet speeds.</p>
  
  <p>I included two different examples (screenshots) of the rendered map, both with the same configuration (OSM - 256x256 tiles) and with the provided TileProviderOsm. One is on a Galaxy Nexus and the other on a Nexus 5 phone. Both do not look like they were rendered correctly.</p>
  
  <p>Any idea what I could do to prevent the blurriness or increase the sharpness?</p>
  
  <p>My TileProvider looks like following:</p>
  
  <pre><code> public class TileProviderOsm extends UrlTileProvider {
  
      private static final String MAP_URL = "http://tile.openstreetmap.org/%d/%d/%d.png";
  
      private static int TILE_WIDTH  = 256;
      private static int TILE_HEIGHT = 256;
  
      public static int MIN_ZOOM = 7;
      public static int MAX_ZOOM = 15;
  
      public TileProviderOsm() {
          super(TILE_WIDTH, TILE_HEIGHT);
      }
  
      @Override
      public synchronized URL getTileUrl(int x, int y, int zoom) {
  
          String s = String.format(Locale.US, MAP_URL, zoom, x, y);
          URL url = null;
          try {
               url = new URL(s);
          } catch (MalformedURLException e) {
              e.printStackTrace();
          }
          return url;
      }
   }
  </code></pre>
  
  <p>Here's how I add the overlay to the map:</p>
  
  <pre><code> map.addTileOverlay(new TileOverlayOptions().tileProvider(new TileProviderOsm()));
  </code></pre>
  
  <p>Here are some examples of the rendered Google Map:</p>
  
  <p><img src="https://i.stack.imgur.com/9oGLO.jpg" alt="Google Maps V2 on a Nexus 5 - OSM Map tiles look blurry">
  <img src="https://i.stack.imgur.com/BLafu.jpg" alt="Google Maps V2 on a Galaxy Nexu - OSM Map tiles look blurry"></p>