Improve code / xml formatting, #54
This commit is contained in:
@@ -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]));
|
||||
}
|
||||
}-*/;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,6 @@ public class FeatureCollection extends JavaScriptObject {
|
||||
|
||||
public final native JsArray<Feature> getFeaturesInternal()/*-{
|
||||
return this.features;
|
||||
}-*/;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}-*/;
|
||||
}-*/;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}-*/;
|
||||
}-*/;
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}-*/;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}-*/;
|
||||
}-*/;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}-*/;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}-*/;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user