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

@@ -27,15 +27,15 @@ public class Feature extends GeoJsonObject {
public final native Geometry<?> getGeometry() /*-{
return this.geometry;
}-*/;
}-*/;
public final native String getId() /*-{
return this.id;
}-*/;
}-*/;
public final native void setId(String id) /*-{
this.id = id;
}-*/;
this.id = id;
}-*/;
public final Map<String, Object> getProperties(HashMap<String, Object> map) {
map.clear();
@@ -45,8 +45,8 @@ public class Feature extends GeoJsonObject {
}
public final native void fromJavascriptObject(HashMap<String, Object> s) /*-{
for(var key in this.properties) {
s.@java.util.HashMap::put(Ljava/lang/Object;Ljava/lang/Object;)(key, Object(this.properties[key]));
}
}-*/;
for(var key in this.properties) {
s.@java.util.HashMap::put(Ljava/lang/Object;Ljava/lang/Object;)(key, Object(this.properties[key]));
}
}-*/;
}

View File

@@ -33,6 +33,6 @@ public class FeatureCollection extends JavaScriptObject {
public final native JsArray<Feature> getFeaturesInternal()/*-{
return this.features;
}-*/;
}-*/;
}

View File

@@ -26,9 +26,9 @@ public abstract class GeoJsonObject extends JavaScriptObject {
public final native double[] getBbox()/*-{
return bbox;
}-*/;
}-*/;
public final native void setBbox(double[] bbox) /*-{
this.bbox = bbox;
}-*/;
}-*/;
}

View File

@@ -65,12 +65,12 @@ public class GeoJsonTileDecoder implements ITileDecoder {
mapElement.clear();
mapElement.tags.clear();
/* add tag information */
/* add tag information */
mTileSource.decodeTags(mapElement, f.getProperties(mProperties));
if (mapElement.tags.numTags == 0)
continue;
/* add geometry information */
/* add geometry information */
decodeGeometry(f.getGeometry());
if (mapElement.type == GeometryType.NONE)

View File

@@ -27,9 +27,9 @@ public abstract class Geometry<T extends JavaScriptObject> extends JsArray<T> {
public final native String type()/*-{
return this.type
}-*/;
}-*/;
public final native JsArray<T> getCoordinates() /*-{
return this.coordinates;
}-*/;
}-*/;
}

View File

@@ -83,19 +83,19 @@ public class JsArrayCollection<T> extends AbstractCollection<T> {
public native final JsArr<T> slice(int start, int end)/*-{
return this.slice(start, end);
}-*/;
}-*/;
public static final native <T> JsArr<T> create() /*-{
return [];
}-*/;
}-*/;
public final native int size() /*-{
return this.length;
}-*/;
return this.length;
}-*/;
public final native T get(int i) /*-{
return this[i];
}-*/;
return this[i];
}-*/;
}
}

View File

@@ -10,9 +10,9 @@ public class LngLat extends JavaScriptObject {
public final native double getLongitude() /*-{
return this[0];
}-*/;
}-*/;
public final native double getLatitude() /*-{
return this[1];
}-*/;
}-*/;
}

View File

@@ -23,10 +23,10 @@ public class MultiLineString extends Geometry<LineString> {
public final native LineString getGeometryN(int i) /*-{
return this[i];
}-*/;
}-*/;
public final native int getNumGeometries() /*-{
return this.length;
}-*/;
}-*/;
}

View File

@@ -23,10 +23,10 @@ public class MultiPolygon extends Geometry<Polygon> {
public final native Polygon getGeometryN(int i) /*-{
return this[i];
}-*/;
}-*/;
public final native int getNumGeometries() /*-{
return this.length;
}-*/;
}-*/;
}

View File

@@ -23,14 +23,14 @@ public class Polygon extends Geometry<LineString> {
public final native LineString getExteriorRing()/*-{
return this[0];
}-*/;
}-*/;
public final native LineString getRing(int i) /*-{
return this[i];
}-*/;
}-*/;
public final native int getNumRings() /*-{
return this.length;
}-*/;
return this.length;
}-*/;
}