Improve code / xml formatting, #54

This commit is contained in:
Emux
2016-07-12 19:25:33 +03:00
parent e793e8851b
commit 43ca550832
133 changed files with 2803 additions and 2791 deletions

View File

@@ -75,10 +75,10 @@ public class GwtLauncher extends GwtApplication {
private static native int getWindowWidth() /*-{
return $wnd.innerWidth;
}-*/;
}-*/;
private static native int getWindowHeight() /*-{
return $wnd.innerHeight;
}-*/;
}-*/;
}

View File

@@ -66,7 +66,7 @@ public class GwtMap extends GdxMap {
private final native void createLayersN()/*-{
$wnd.createLayers();
}-*/;
}-*/;
@Override
protected void createLayers() {

View File

@@ -15,8 +15,8 @@ public class JsBitmapTileLayer extends BitmapTileLayer implements ExportOverlay<
super(map, tileSource);
}
// @ExportConstructor
// public static BitmapTileLayer constructor(Map map, TileSource tileSource) {
// return new JsBitmapTileLayer(map, tileSource);
// }
// @ExportConstructor
// public static BitmapTileLayer constructor(Map map, TileSource tileSource) {
// return new JsBitmapTileLayer(map, tileSource);
// }
}

View File

@@ -19,9 +19,9 @@ public class JsBitmapTileSource extends BitmapTileSource implements
public ITileDataSource getDataSource() {
return null;
}
// @ExportConstructor
// public static BitmapTileSource constructor(String url, int zoomMin, int zoomMax) {
// return new JsBitmapTileSource(url, zoomMin, zoomMax);
// }
// @ExportConstructor
// public static BitmapTileSource constructor(String url, int zoomMin, int zoomMax) {
// return new JsBitmapTileSource(url, zoomMin, zoomMax);
// }
}

View File

@@ -53,7 +53,7 @@ public class JsMap implements Exportable {
mMap = map;
}
// @ExportInstanceMethod("foo")
// @ExportInstanceMethod("foo")
// public static String instanceMethod(Map instance, String surname) {
// return instance.getName() + "-" + surname;
// }

View File

@@ -122,8 +122,8 @@ public class JsOverlays implements Exportable {
}
}
// @ExportPackage("vtm")
// @Export("Viewport")
// public interface XViewport extends ExportOverlay
// @ExportPackage("vtm")
// @Export("Viewport")
// public interface XViewport extends ExportOverlay
//
}

View File

@@ -1,102 +1,102 @@
.header {
background-color: #ddd;
text-align: center;
background-color: #ddd;
text-align: center;
}
html,body {
height: 100%;
width: 100%;
margin: 0 0 0 0;
font-family: Arial, "MS Trebuchet", sans-serif;
height: 100%;
width: 100%;
margin: 0 0 0 0;
font-family: Arial, "MS Trebuchet", sans-serif;
}
#credits {
position: absolute;
bottom: 0.2em;
right: 0.2em;
z-index: 20000;
color: white;
background-color: #000;
opacity: 0.5;
padding: 0.2em 0.5em 0.2em 0.5em;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
font-size: 11px;
position: absolute;
bottom: 0.2em;
right: 0.2em;
z-index: 20000;
color: white;
background-color: #000;
opacity: 0.5;
padding: 0.2em 0.5em 0.2em 0.5em;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
font-size: 11px;
}
#credits a {
color: white;
text-decoration: none;
font-variant: small-caps;
color: white;
text-decoration: none;
font-variant: small-caps;
}
#search {
z-index: 20000;
position: absolute;
top: 0.5em;
left: 0.5em;
background-color: rgba(0, 0, 0, 0.8);
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
visibility: hidden;
z-index: 20000;
position: absolute;
top: 0.5em;
left: 0.5em;
background-color: rgba(0, 0, 0, 0.8);
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
visibility: hidden;
}
#listContainer {
color: #FFFFFF;
color: #FFFFFF;
}
#nameFieldContainer,.gwt-TextBox {
width: 250px;
width: 250px;
}
/* Turn on a 16x16 scrollbar */
::-webkit-scrollbar {
width: 10px;
height: 0px;
width: 10px;
height: 0px;
}
/* Turn on single button up on top, and down on bottom */
::-webkit-scrollbar-button:start:decrement,::-webkit-scrollbar-button:end:increment
{
display: block;
{
display: block;
}
/* Turn off the down area up on top, and up area on bottom */
::-webkit-scrollbar-button:vertical:start:increment,::-webkit-scrollbar-button:vertical:end:decrement
{
display: none;
{
display: none;
}
/* Place The scroll down button at the bottom */
::-webkit-scrollbar-button:end:increment {
/*background-image: url(images/scroll_cntrl_dwn.png);*/
/*background-image: url(images/scroll_cntrl_dwn.png);*/
}
/* Place The scroll up button at the up */
::-webkit-scrollbar-button:start:decrement {
/*background-image: url(images/scroll_cntrl_up.png);*/
/*background-image: url(images/scroll_cntrl_up.png);*/
}
/* Top area above thumb and below up button */
::-webkit-scrollbar-track-piece:vertical:start {
/*background-image: url(images/scroll_gutter_top.png), url(images/scroll_gutter_mid.png);
background-repeat: no-repeat, repeat-y;*/
/*background-image: url(images/scroll_gutter_top.png), url(images/scroll_gutter_mid.png);
background-repeat: no-repeat, repeat-y;*/
}
/* Bottom area below thumb and down button */
::-webkit-scrollbar-track-piece:vertical:end {
/*background-image: url(images/scroll_gutter_btm.png), url(images/scroll_gutter_mid.png);
background-repeat: no-repeat, repeat-y;
background-position: bottom left, 0 0;*/
/*background-image: url(images/scroll_gutter_btm.png), url(images/scroll_gutter_mid.png);
background-repeat: no-repeat, repeat-y;
background-position: bottom left, 0 0;*/
}
/* The thumb itself */
::-webkit-scrollbar-thumb:vertical {
height: 56px;
width: 12px;
/* -webkit-border-image: url(images/scroll_thumb.png) 8 0 8 0 stretch stretch;*/
background-color: #DDDDDD;
opacity: 0.5;
height: 56px;
width: 12px;
/* -webkit-border-image: url(images/scroll_thumb.png) 8 0 8 0 stretch stretch;*/
background-color: #DDDDDD;
opacity: 0.5;
}

View File

@@ -1,42 +1,42 @@
var mapconfig = {
zoom : 12,
latitude : 53.075,
longitude : 8.8080,
tileSize : 400
zoom : 12,
latitude : 53.075,
longitude : 8.8080,
tileSize : 400
}
function createLayers() {
var m = map.map();
var m = map.map();
// var t = map.loadTheme("DEFAULT");
// var ts = new vtm.OSciMap4TileSource();
// var l = new vtm.OsmTileLayer(m);
// l.setTileSource(ts)
// l.setRenderTheme(t)
// var t = map.loadTheme("DEFAULT");
// var ts = new vtm.OSciMap4TileSource();
// var l = new vtm.OsmTileLayer(m);
// l.setTileSource(ts)
// l.setRenderTheme(t)
var s = new vtm.BitmapTileSource("http://a.tile.stamen.com/toner", 0, 18);
var l = new vtm.BitmapTileLayer(m, s);
map.addLayer(l)
// map.addLayer(new vtm.BuildingLayer(m, l))
// map.addLayer(new vtm.LabelLayer(m, l))
var s = new vtm.BitmapTileSource("http://a.tile.stamen.com/toner", 0, 18);
var l = new vtm.BitmapTileLayer(m, s);
map.addLayer(l)
// map.addLayer(new vtm.BuildingLayer(m, l))
// map.addLayer(new vtm.LabelLayer(m, l))
t = map.loadTheme("TRONRENDER")
ts = new vtm.OsmLanduseJsonTileSource()
l = new vtm.VectorTileLayer(m, ts)
l.setRenderTheme(t)
map.addLayer(l)
t = map.loadTheme("TRONRENDER")
ts = new vtm.OsmLanduseJsonTileSource()
l = new vtm.VectorTileLayer(m, ts)
l.setRenderTheme(t)
map.addLayer(l)
}
function canvasResize() {
div = document.getElementById('canvas-area')
canvas = document.getElementById('map-canvas')
var w = div.scrollWidth;
var h = div.scrollHeight;
// console.log(div.clientHeight + " " + div.clientWidth)
canvas.width = w;
canvas.height = h;
canvas.style.width = w + 'px';
canvas.style.height = h + 'px';
div = document.getElementById('canvas-area')
canvas = document.getElementById('map-canvas')
var w = div.scrollWidth;
var h = div.scrollHeight;
// console.log(div.clientHeight + " " + div.clientWidth)
canvas.width = w;
canvas.height = h;
canvas.style.width = w + 'px';
canvas.style.height = h + 'px';
}
canvasResize();
window.addEventListener('resize', canvasResize, false);