Improve code / xml formatting, closes #54
This commit is contained in:
@@ -11,12 +11,12 @@ import org.timepedia.exporter.client.ExportPackage;
|
||||
@Export("BitmapTileLayer")
|
||||
public class JsBitmapTileLayer extends BitmapTileLayer implements ExportOverlay<BitmapTileLayer> {
|
||||
|
||||
public JsBitmapTileLayer(Map map, TileSource tileSource) {
|
||||
super(map, tileSource);
|
||||
}
|
||||
public JsBitmapTileLayer(Map map, TileSource tileSource) {
|
||||
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);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -11,17 +11,17 @@ import org.timepedia.exporter.client.ExportPackage;
|
||||
public class JsBitmapTileSource extends BitmapTileSource implements
|
||||
ExportOverlay<BitmapTileSource> {
|
||||
|
||||
public JsBitmapTileSource(String url, int zoomMin, int zoomMax) {
|
||||
super(url, zoomMin, zoomMax);
|
||||
}
|
||||
public JsBitmapTileSource(String url, int zoomMin, int zoomMax) {
|
||||
super(url, zoomMin, zoomMax);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITileDataSource getDataSource() {
|
||||
return null;
|
||||
}
|
||||
// @ExportConstructor
|
||||
// public static BitmapTileSource constructor(String url, int zoomMin, int zoomMax) {
|
||||
// return new JsBitmapTileSource(url, zoomMin, zoomMax);
|
||||
// }
|
||||
@Override
|
||||
public ITileDataSource getDataSource() {
|
||||
return null;
|
||||
}
|
||||
// @ExportConstructor
|
||||
// public static BitmapTileSource constructor(String url, int zoomMin, int zoomMax) {
|
||||
// return new JsBitmapTileSource(url, zoomMin, zoomMax);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -16,45 +16,45 @@ import org.timepedia.exporter.client.NoExport;
|
||||
@Export("map")
|
||||
public class JsMap implements Exportable {
|
||||
|
||||
static Map mMap;
|
||||
static Map mMap;
|
||||
|
||||
@Export
|
||||
public static Map map() {
|
||||
return mMap;
|
||||
}
|
||||
@Export
|
||||
public static Map map() {
|
||||
return mMap;
|
||||
}
|
||||
|
||||
@Export
|
||||
public static Layers layers() {
|
||||
return mMap.layers();
|
||||
}
|
||||
@Export
|
||||
public static Layers layers() {
|
||||
return mMap.layers();
|
||||
}
|
||||
|
||||
@Export
|
||||
public static boolean addLayer(Layer l) {
|
||||
return mMap.layers().add(l);
|
||||
}
|
||||
@Export
|
||||
public static boolean addLayer(Layer l) {
|
||||
return mMap.layers().add(l);
|
||||
}
|
||||
|
||||
@Export
|
||||
public static boolean getPosition(MapPosition pos) {
|
||||
return mMap.getMapPosition(pos);
|
||||
}
|
||||
@Export
|
||||
public static boolean getPosition(MapPosition pos) {
|
||||
return mMap.getMapPosition(pos);
|
||||
}
|
||||
|
||||
@Export
|
||||
public static void setPosition(MapPosition pos) {
|
||||
mMap.setMapPosition(pos);
|
||||
}
|
||||
@Export
|
||||
public static void setPosition(MapPosition pos) {
|
||||
mMap.setMapPosition(pos);
|
||||
}
|
||||
|
||||
@Export
|
||||
public static IRenderTheme loadTheme(String theme) {
|
||||
return ThemeLoader.load(VtmThemes.valueOf(theme));
|
||||
}
|
||||
@Export
|
||||
public static IRenderTheme loadTheme(String theme) {
|
||||
return ThemeLoader.load(VtmThemes.valueOf(theme));
|
||||
}
|
||||
|
||||
@NoExport
|
||||
public static void init(Map map) {
|
||||
mMap = map;
|
||||
}
|
||||
@NoExport
|
||||
public static void init(Map map) {
|
||||
mMap = map;
|
||||
}
|
||||
|
||||
// @ExportInstanceMethod("foo")
|
||||
// public static String instanceMethod(Map instance, String surname) {
|
||||
// return instance.getName() + "-" + surname;
|
||||
// }
|
||||
// @ExportInstanceMethod("foo")
|
||||
// public static String instanceMethod(Map instance, String surname) {
|
||||
// return instance.getName() + "-" + surname;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ import org.timepedia.exporter.client.ExportPackage;
|
||||
|
||||
@ExportPackage("vtm")
|
||||
public class JsOsmLanduseJsonTileSource implements ExportOverlay<OsmLanduseJsonTileSource> {
|
||||
public JsOsmLanduseJsonTileSource() {
|
||||
}
|
||||
public JsOsmLanduseJsonTileSource() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,104 +22,108 @@ import org.timepedia.exporter.client.Exportable;
|
||||
|
||||
@ExportPackage("")
|
||||
public class JsOverlays implements Exportable {
|
||||
@ExportPackage("vtm")
|
||||
@Export("Layers")
|
||||
public interface XLayers extends ExportOverlay<Layers> {
|
||||
void add(Layer layer);
|
||||
}
|
||||
@ExportPackage("vtm")
|
||||
@Export("Layers")
|
||||
public interface XLayers extends ExportOverlay<Layers> {
|
||||
void add(Layer layer);
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("Map")
|
||||
public interface XMap extends ExportOverlay<Map> {
|
||||
public abstract Layers layers();
|
||||
@ExportPackage("vtm")
|
||||
@Export("Map")
|
||||
public interface XMap extends ExportOverlay<Map> {
|
||||
public abstract Layers layers();
|
||||
|
||||
public abstract void setMapPosition(MapPosition pos);
|
||||
public abstract void setMapPosition(MapPosition pos);
|
||||
|
||||
public abstract MapPosition getMapPosition();
|
||||
public abstract MapPosition getMapPosition();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("MapPosition")
|
||||
public static class XMapPosition implements ExportOverlay<MapPosition> {
|
||||
public XMapPosition(double latitude, double longitude, double scale) {
|
||||
};
|
||||
@ExportPackage("vtm")
|
||||
@Export("MapPosition")
|
||||
public static class XMapPosition implements ExportOverlay<MapPosition> {
|
||||
public XMapPosition(double latitude, double longitude, double scale) {
|
||||
}
|
||||
|
||||
public XMapPosition() {
|
||||
};
|
||||
;
|
||||
|
||||
public void setPosition(double latitude, double longitude) {
|
||||
}
|
||||
public XMapPosition() {
|
||||
}
|
||||
|
||||
public void setScale(double scale) {
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("GenericLayer")
|
||||
public abstract class XGenericLayer implements ExportOverlay<GenericLayer> {
|
||||
public XGenericLayer(Map map, LayerRenderer renderer) {
|
||||
}
|
||||
}
|
||||
public void setPosition(double latitude, double longitude) {
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("TileGridLayer")
|
||||
public static class XTileGridLayer implements ExportOverlay<TileGridLayer> {
|
||||
public XTileGridLayer(Map map) {
|
||||
}
|
||||
}
|
||||
public void setScale(double scale) {
|
||||
}
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("OsmTileLayer")
|
||||
public static class XOsmTileLayer implements ExportOverlay<OsmTileLayer> {
|
||||
public XOsmTileLayer(Map map) {
|
||||
}
|
||||
@ExportPackage("vtm")
|
||||
@Export("GenericLayer")
|
||||
public abstract class XGenericLayer implements ExportOverlay<GenericLayer> {
|
||||
public XGenericLayer(Map map, LayerRenderer renderer) {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean setTileSource(TileSource tileSource) {
|
||||
return false;
|
||||
}
|
||||
@ExportPackage("vtm")
|
||||
@Export("TileGridLayer")
|
||||
public static class XTileGridLayer implements ExportOverlay<TileGridLayer> {
|
||||
public XTileGridLayer(Map map) {
|
||||
}
|
||||
}
|
||||
|
||||
public void setRenderTheme(IRenderTheme theme) {
|
||||
}
|
||||
}
|
||||
@ExportPackage("vtm")
|
||||
@Export("OsmTileLayer")
|
||||
public static class XOsmTileLayer implements ExportOverlay<OsmTileLayer> {
|
||||
public XOsmTileLayer(Map map) {
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("HighroadJsonTileSource")
|
||||
public static class XHighroadJsonTileSource implements
|
||||
ExportOverlay<HighroadJsonTileSource> {
|
||||
public XHighroadJsonTileSource() {
|
||||
}
|
||||
}
|
||||
public boolean setTileSource(TileSource tileSource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("OSciMap4TileSource")
|
||||
public static class XOSciMap4TileSource implements
|
||||
ExportOverlay<OSciMap4TileSource> {
|
||||
public XOSciMap4TileSource(String url) {
|
||||
}
|
||||
public void setRenderTheme(IRenderTheme theme) {
|
||||
}
|
||||
}
|
||||
|
||||
public XOSciMap4TileSource() {
|
||||
}
|
||||
}
|
||||
@ExportPackage("vtm")
|
||||
@Export("HighroadJsonTileSource")
|
||||
public static class XHighroadJsonTileSource implements
|
||||
ExportOverlay<HighroadJsonTileSource> {
|
||||
public XHighroadJsonTileSource() {
|
||||
}
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("LabelLayer")
|
||||
public static class XLabelLayer implements
|
||||
ExportOverlay<LabelLayer> {
|
||||
public XLabelLayer(Map map, VectorTileLayer l) {
|
||||
}
|
||||
}
|
||||
@ExportPackage("vtm")
|
||||
@Export("OSciMap4TileSource")
|
||||
public static class XOSciMap4TileSource implements
|
||||
ExportOverlay<OSciMap4TileSource> {
|
||||
public XOSciMap4TileSource(String url) {
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("BuildingLayer")
|
||||
public static class XBuildingLayer implements
|
||||
ExportOverlay<BuildingLayer> {
|
||||
public XBuildingLayer(Map map, VectorTileLayer l) {
|
||||
}
|
||||
}
|
||||
public XOSciMap4TileSource() {
|
||||
}
|
||||
}
|
||||
|
||||
// @ExportPackage("vtm")
|
||||
// @Export("Viewport")
|
||||
// public interface XViewport extends ExportOverlay
|
||||
//
|
||||
@ExportPackage("vtm")
|
||||
@Export("LabelLayer")
|
||||
public static class XLabelLayer implements
|
||||
ExportOverlay<LabelLayer> {
|
||||
public XLabelLayer(Map map, VectorTileLayer l) {
|
||||
}
|
||||
}
|
||||
|
||||
@ExportPackage("vtm")
|
||||
@Export("BuildingLayer")
|
||||
public static class XBuildingLayer implements
|
||||
ExportOverlay<BuildingLayer> {
|
||||
public XBuildingLayer(Map map, VectorTileLayer l) {
|
||||
}
|
||||
}
|
||||
|
||||
// @ExportPackage("vtm")
|
||||
// @Export("Viewport")
|
||||
// public interface XViewport extends ExportOverlay
|
||||
//
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@ import org.timepedia.exporter.client.ExportPackage;
|
||||
|
||||
@ExportPackage("vtm")
|
||||
public class JsVectorTileLayer implements ExportOverlay<VectorTileLayer> {
|
||||
public JsVectorTileLayer(Map map, TileSource tileSource) {
|
||||
}
|
||||
public JsVectorTileLayer(Map map, TileSource tileSource) {
|
||||
}
|
||||
|
||||
public boolean setTileSource(TileSource tileSource) {
|
||||
return false;
|
||||
}
|
||||
public boolean setTileSource(TileSource tileSource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setRenderTheme(IRenderTheme theme) {
|
||||
}
|
||||
public void setRenderTheme(IRenderTheme theme) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user