Skip to content
nutiteq edited this page Sep 14, 2012 · 1 revision

Current SDK has known issue that if you zoom map to closest zooms, 17 and more, then you may see inaccuracy in matching map tiles (small gaps between tiles), and vector data / 3D models on map. This comes from Float datatype accuracy limitations, and OpenGL space is built in a way that changing this would have other problems - more complicated API, memory use etc. Fortunately there is quite simple workaround: if you redefine your world to smaller area than globe, then the inaccuracy problem starts with higher zoom levels. For example, if you limit the world to one tile under zoom 5 your map coverage would be about 1250x1250 km (i.e. 40000 / 2ˆ5), and your maximum zoom without accuracy issues would be 23 or so.

For this you need to use special recalculated projection with limited zoom, currently there is implementation for EPSG3857 projection, and you need to tell also Map Layer where the world is limited. This requires two changes in application, lets do with example of California. It fits quite nicely to this map tile: http://c.tile.openstreetmap.org/5/5/12.png

Map tile z=5, x=5, y=12

  // 1. limit projection to, x=5, y=12, zoom=5
  this.proj = new EPSG3857(5,12,5);
  // create map layer as you usually do
  TMSMapLayer baseMapLayer = new TMSMapLayer(this.proj, 5, 19,  12345,
                "http://c.tile.openstreetmap.org", "/", ".png");
  // 2. set to map layer that it must be recalculated
  baseMapLayer.setWorldTile(5,12,5);
Clone this wiki locally