src/test/java/de/blau/android/resources/TileLayerServerTest.java
/**
     * Get a tile url for the "standard" style layer
     */
Get a tile url for the "standard" style layer
Get a tile url for the " standard " style layer
@Test
    public void buildurl() {
        Map map = main.getMap();
        MapTile mapTile = new MapTile("", 20, 1111, 2222);
        Preferences prefs = new Preferences(main);
        LayerUtils.removeImageryLayers(main);
        de.blau.android.layer.Util.addLayer(main, LayerType.IMAGERY, TileLayerSource.LAYER_MAPNIK);
        main.getMap().setPrefs(main, prefs);
        TileLayerSource t2 = map.getBackgroundLayer().getTileLayerConfiguration();
        System.out.println(t2.toString());
        String tileUrl = t2.getTileURLString(mapTile);
        System.out.println("Parameters replaced " + tileUrl);
        Assert.assertTrue(tileUrl.contains("1111"));
        Assert.assertTrue(tileUrl.contains("2222"));
        Assert.assertTrue(tileUrl.contains("20"));
    }
@ Test public void buildurl ( ) { Map map = main . getMap ( ) ; MapTile mapTile = new MapTile ( "" , 20 , 1111 , 2222 ) ; Preferences prefs = new Preferences ( main ) ; LayerUtils . removeImageryLayers ( main ) ; de . blau . android . layer . Util . addLayer ( main , LayerType . IMAGERY , TileLayerSource . LAYER_MAPNIK ) ; main . getMap ( ) . setPrefs ( main , prefs ) ; TileLayerSource t2 = map . getBackgroundLayer ( ) . getTileLayerConfiguration ( ) ; System . out . println ( t2 . toString ( ) ) ; String tileUrl = t2 . getTileURLString ( mapTile ) ; System . out . println ( "Parameters replaced " + tileUrl ) ; Assert . assertTrue ( tileUrl . contains ( "1111" ) ) ; Assert . assertTrue ( tileUrl . contains ( "2222" ) ) ; Assert . assertTrue ( tileUrl . contains ( "20" ) ) ; }
Get a tile url for the "standard" style layer
Get a tile url for the " standard " style layer