diff --git a/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/Map.java b/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/Map.java index a465e835..bf1e16a3 100644 --- a/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/Map.java +++ b/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/Map.java @@ -428,6 +428,10 @@ public Size getSize() { return new Size(MapImpl.getSize(getJSObject())); } + public void setMaxResolution(double res) { + getJSObject().setProperty("maxResolution", res); + } + public double getMaxResolution() { return MapImpl.getMaxResolution(getJSObject()); } diff --git a/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilities.java b/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilities.java index 1e1278a4..b3049078 100644 --- a/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilities.java +++ b/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilities.java @@ -78,6 +78,10 @@ public Layer createLayer(JSObject capabilities, WMTSCapabilitiesConfig options) JSObject result = WMTSCapabilitiesImpl.createLayer(getJSObject(), capabilities, options.getJSObject()); return WMTS.narrowToLayer(result); } + + public String[] createMatrixIds(JSObject capabilities, String tileMatrixSet){ + return WMTSCapabilitiesImpl.createMatrixIds(getJSObject(), capabilities, tileMatrixSet); + } public static WMTSCapabilities narrowToWMTSCapabilities(JSObject element) { return (element == null) ? null : new WMTSCapabilities(element); diff --git a/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilitiesImpl.java b/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilitiesImpl.java index 15f694d8..7fe9dfb6 100644 --- a/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilitiesImpl.java +++ b/gwt-openlayers-client/src/main/java/org/gwtopenmaps/openlayers/client/format/wmts/WMTSCapabilitiesImpl.java @@ -39,5 +39,16 @@ public static native JSObject create(JSObject options)/*-{ public static native JSObject createLayer(JSObject self, JSObject capabilities, JSObject options)/*-{ return self.createLayer(capabilities, options); }-*/; + + public static native String[] createMatrixIds(JSObject self, JSObject capabilities, String tileMatrixSet)/*-{ + var matrixIds = []; + var numOfTileMatrixSet = capabilities.contents.tileMatrixSets[tileMatrixSet].matrixIds.length; + + for (var i=0; i