Improve code / xml formatting, closes #54

This commit is contained in:
Emux
2016-07-09 19:45:22 +03:00
parent 7919d0ab9c
commit e793e8851b
458 changed files with 58405 additions and 63062 deletions

View File

@@ -13,49 +13,49 @@ import org.slf4j.LoggerFactory;
public class ThemeBuilderTest extends GdxMap {
final Logger log = LoggerFactory.getLogger(S3DBLayerTest.class);
final Logger log = LoggerFactory.getLogger(S3DBLayerTest.class);
static class MyTheme extends ThemeBuilder {
public MyTheme() {
rules(
matchKeyValue("natural", "water")
.style(area(Color.BLUE)),
static class MyTheme extends ThemeBuilder {
public MyTheme() {
rules(
matchKeyValue("natural", "water")
.style(area(Color.BLUE)),
matchKeyValue("landuse", "forest")
.style(area(Color.GREEN)),
matchKeyValue("landuse", "forest")
.style(area(Color.GREEN)),
matchKeyValue("landuse", "residential")
.style(area(Color.LTGRAY)),
matchKeyValue("landuse", "residential")
.style(area(Color.LTGRAY)),
matchKey("highway")
.rules(matchValue("residential")
.style(line(Color.DKGRAY, 1.2f),
line(Color.WHITE, 1.1f)
.cap(Cap.ROUND)))
matchKey("highway")
.rules(matchValue("residential")
.style(line(Color.DKGRAY, 1.2f),
line(Color.WHITE, 1.1f)
.cap(Cap.ROUND)))
.style(line(Color.BLACK, 1)
.blur(0.5f)));
}
}
.style(line(Color.BLACK, 1)
.blur(0.5f)));
}
}
@Override
public void createLayers() {
@Override
public void createLayers() {
VectorTileLayer l = mMap.setBaseMap(new OSciMap4TileSource());
VectorTileLayer l = mMap.setBaseMap(new OSciMap4TileSource());
RenderTheme t = new MyTheme().build();
RenderTheme t = new MyTheme().build();
mMap.setTheme(t);
//mMap.setTheme(VtmThemes.DEFAULT);
mMap.setTheme(t);
//mMap.setTheme(VtmThemes.DEFAULT);
mMap.layers().add(new LabelLayer(mMap, l));
mMap.layers().add(new LabelLayer(mMap, l));
mMap.setMapPosition(53.08, 8.82, 1 << 17);
mMap.setMapPosition(53.08, 8.82, 1 << 17);
}
}
public static void main(String[] args) {
GdxMapApp.init();
GdxMapApp.run(new ThemeBuilderTest(), null, 400);
}
public static void main(String[] args) {
GdxMapApp.init();
GdxMapApp.run(new ThemeBuilderTest(), null, 400);
}
}