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

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

View File

@@ -103,31 +103,31 @@ public class SearchBox {
public final native String getId()
/*-{
return this.osm_id;
}-*/;
}-*/;
public final native String name() /*-{
return this.display_name;
}-*/;
return this.display_name;
}-*/;
public final native BBox getBBox() /*-{
return this.boundingbox
}-*/;
return this.boundingbox
}-*/;
public final native String getWkt() /*-{
return this.geotext;
}-*/;
return this.geotext;
}-*/;
private final native String latitude() /*-{
return this.lat;
}-*/;
return this.lat;
}-*/;
private final native String longitude() /*-{
return this.lon;
}-*/;
return this.lon;
}-*/;
public final native String getIcon() /*-{
return this.icon;
}-*/;
return this.icon;
}-*/;
@Override
public double getLatitude() {
@@ -248,7 +248,7 @@ public class SearchBox {
mOverlay.clearPath();
//log.debug("selected " + d.getName() + " " + d.getLatitude() + " "
// + d.getLongitude());
// + d.getLongitude());
BoundingBox b = d.getBoundingBox();
if (b != null) {

View File

@@ -220,21 +220,21 @@ public class WKTReader {
return neg ? -val : val;
}
// public static void main(String[] args) {
// WKTReader r = new WKTReader();
// GeometryBuffer geom = new GeometryBuffer(10, 10);
// try {
// String wkt = "MULTIPOINT(0 0,1 0)";
// r.parse(wkt, geom);
// for (int i = 0; i < geom.index.length; i++) {
// int len = geom.index[i];
// if (len < 0)
// break;
// for (int p = 0; p < len; p += 2)
// System.out.println(len + ": " + geom.points[p] + "," + geom.points[p + 1]);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// public static void main(String[] args) {
// WKTReader r = new WKTReader();
// GeometryBuffer geom = new GeometryBuffer(10, 10);
// try {
// String wkt = "MULTIPOINT(0 0,1 0)";
// r.parse(wkt, geom);
// for (int i = 0; i < geom.index.length; i++) {
// int len = geom.index[i];
// if (len < 0)
// break;
// for (int p = 0; p < len; p += 2)
// System.out.println(len + ": " + geom.points[p] + "," + geom.points[p + 1]);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
}

View File

@@ -1,106 +1,106 @@
.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

@@ -16,15 +16,15 @@
<link rel="stylesheet" type="text/css" href="default.css">
<script type="text/javascript">
var mapconfig = {
tilesource : "oscimap4",
tileurl : "http://opensciencemap.org/tiles/vtm",
zoom : 2,
latitude : 0.0,
longitude : 0.0,
tileSize : 400
}
//background : "naturalearth"
var mapconfig = {
tilesource : "oscimap4",
tileurl : "http://opensciencemap.org/tiles/vtm",
zoom : 2,
latitude : 0.0,
longitude : 0.0,
tileSize : 400
}
//background : "naturalearth"
</script>
@@ -43,19 +43,19 @@
</div>
<script type="text/Javascript">
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';
}
canvasResize();
window.addEventListener('resize', canvasResize, false);
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';
}
canvasResize();
window.addEventListener('resize', canvasResize, false);
</script>
<script type="text/javascript" src="VtmWebApp/js/_tessellate.js"></script>