├── .gitignore ├── site.sh ├── release.sh ├── gwt-ol3-client └── src │ ├── main │ ├── resources │ │ ├── proj4 │ │ │ └── GwtProj4.gwt.xml │ │ ├── com │ │ │ └── github │ │ │ │ └── desjardins │ │ │ │ └── elemental │ │ │ │ └── ElementalExtension.gwt.xml │ │ └── ol │ │ │ └── GwtOL.gwt.xml │ └── java │ │ ├── ol │ │ ├── VectorTile.java │ │ ├── layer │ │ │ ├── Graticule.java │ │ │ ├── Tile.java │ │ │ ├── Image.java │ │ │ ├── VectorLayerOptions.java │ │ │ ├── VectorTileLayerOptions.java │ │ │ ├── HeatmapWeightFunction.java │ │ │ ├── Vector.java │ │ │ └── VectorTile.java │ │ ├── source │ │ │ ├── Image.java │ │ │ ├── ImageMapGuide.java │ │ │ ├── ImageStatic.java │ │ │ ├── TileArcGisRestOptions.java │ │ │ ├── Osm.java │ │ │ ├── TileLoadFunction.java │ │ │ ├── TileUrlFunction.java │ │ │ ├── ImageArcGisRest.java │ │ │ ├── BingMaps.java │ │ │ ├── TileImage.java │ │ │ ├── TileWmsParams.java │ │ │ ├── ImageLoadFunction.java │ │ │ ├── TileArcGisRest.java │ │ │ ├── TileDebug.java │ │ │ ├── WmsFeatureInfoParams.java │ │ │ ├── FeatureUrlFunction.java │ │ │ └── TileWms.java │ │ ├── EventsKey.java │ │ ├── ImageBase.java │ │ ├── Disposable.java │ │ ├── interaction │ │ │ ├── DragRotate.java │ │ │ ├── PinchRotate.java │ │ │ ├── PinchZoom.java │ │ │ ├── KeyboardPan.java │ │ │ ├── KeyboardZoom.java │ │ │ ├── DoubleClickZoom.java │ │ │ ├── DragRotateAndZoom.java │ │ │ ├── DragPan.java │ │ │ ├── DragZoom.java │ │ │ ├── MouseWheelZoom.java │ │ │ ├── DrawMode.java │ │ │ ├── DrawEventType.java │ │ │ └── DragAndDrop.java │ │ ├── Options.java │ │ ├── easing │ │ │ └── EasingOperation.java │ │ ├── RasterOperation.java │ │ ├── Image.java │ │ ├── format │ │ │ ├── Gpx.java │ │ │ ├── Kml.java │ │ │ ├── JsonFeature.java │ │ │ ├── filter │ │ │ │ ├── Not.java │ │ │ │ ├── IsNull.java │ │ │ │ ├── And.java │ │ │ │ ├── IsLike.java │ │ │ │ ├── Or.java │ │ │ │ ├── LessThan.java │ │ │ │ ├── GreaterThan.java │ │ │ │ ├── LessThanOrEqualTo.java │ │ │ │ ├── GreaterThanOrEqualTo.java │ │ │ │ ├── LogicalNary.java │ │ │ │ ├── During.java │ │ │ │ └── Comparison.java │ │ │ ├── OsmXml.java │ │ │ ├── WmsGetFeatureInfo.java │ │ │ ├── Feature.java │ │ │ ├── TextFeature.java │ │ │ ├── MvtOptions.java │ │ │ ├── WmsGetFeatureInfoOptions.java │ │ │ └── OsmXmlFeatureOptions.java │ │ ├── DragBoxEndConditionFunction.java │ │ ├── ImageTile.java │ │ ├── Params.java │ │ ├── SelectFilterFunction.java │ │ ├── control │ │ │ ├── Rotate.java │ │ │ ├── FullScreen.java │ │ │ ├── ZoomSlider.java │ │ │ ├── ZoomToExtent.java │ │ │ ├── Attribution.java │ │ │ ├── Zoom.java │ │ │ └── ScaleLine.java │ │ ├── events │ │ │ └── EventTarget.java │ │ ├── GenericFunction.java │ │ ├── tilegrid │ │ │ ├── WmtsTileGrid.java │ │ │ └── WmtsTileGridOptions.java │ │ ├── GeometryFunction.java │ │ ├── event │ │ │ ├── MeasureListener.java │ │ │ └── EventListener.java │ │ ├── loadingstrategy │ │ │ └── LoadingStrategyFunction.java │ │ ├── style │ │ │ ├── OrderFunction.java │ │ │ ├── OrderFunctionRender.java │ │ │ ├── Circle.java │ │ │ ├── StyleFunction.java │ │ │ ├── RenderFunction.java │ │ │ └── CircleOptions.java │ │ ├── ForEachFunction.java │ │ ├── webgl │ │ │ └── WebGL.java │ │ ├── FeatureAtPixelOptions.java │ │ ├── geom │ │ │ ├── GeometryType.java │ │ │ └── LinearRing.java │ │ ├── Kinetic.java │ │ ├── MapEvent.java │ │ ├── FrameState.java │ │ ├── featureloader │ │ │ └── FeatureLoader.java │ │ ├── has │ │ │ └── Has.java │ │ ├── FeatureAtPixelFunction.java │ │ ├── LayerAtPixelFunction.java │ │ ├── Tile.java │ │ ├── ViewState.java │ │ ├── proj │ │ │ └── ProjectionOptions.java │ │ └── FeatureOptions.java │ │ └── com │ │ └── github │ │ └── desjardins │ │ └── elemental │ │ └── XMLSerializer.java │ └── test │ ├── resources │ ├── ol │ │ └── GwtOLTest.gwt.xml │ ├── com │ │ └── github │ │ │ └── desjardins │ │ │ └── gwt │ │ │ └── junit │ │ │ └── TestUtils.gwt.xml │ └── proj4 │ │ └── GwtProj4Test.gwt.xml │ └── java │ ├── ol │ ├── has │ │ └── HasTest.java │ ├── GraticuleTest.java │ ├── control │ │ ├── AttributionTest.java │ │ ├── RotateTest.java │ │ ├── FullScreenTest.java │ │ ├── ZoomSliderTest.java │ │ ├── ZoomToExtentTest.java │ │ └── OverviewMapTest.java │ ├── KineticTest.java │ ├── webgl │ │ └── WebGLTest.java │ ├── loadingstrategy │ │ └── LoadingStrategyTest.java │ ├── GwtOLBaseTestCase.java │ ├── format │ │ ├── GpxTest.java │ │ ├── MvtTest.java │ │ └── WmsGetFeatureInfoTest.java │ ├── interaction │ │ ├── PinchZoomTest.java │ │ ├── DragAndDropTest.java │ │ ├── KeyboardPanTest.java │ │ ├── PinchRotateTest.java │ │ ├── KeyboardZoomTest.java │ │ ├── SnapTest.java │ │ ├── DragPanTest.java │ │ ├── MouseWheelZoomTest.java │ │ ├── DragBoxTest.java │ │ ├── DragRotateTest.java │ │ ├── TranslateTest.java │ │ ├── DoubleClickZoomTest.java │ │ ├── DragZoomTest.java │ │ └── DragRotateAndZoomTest.java │ ├── source │ │ ├── VectorTileTest.java │ │ ├── BingMapsTest.java │ │ └── ImageStaticTest.java │ ├── OverlayTest.java │ ├── style │ │ ├── IconImageCacheTest.java │ │ └── FillTest.java │ ├── layer │ │ ├── ImageTest.java │ │ ├── TileTest.java │ │ └── VectorTileTest.java │ └── PixelTest.java │ └── proj4 │ ├── GwtProj4BaseTestCase.java │ └── GwtProj4TestSuite.java ├── ci └── settings.xml ├── gwt-ol3-demo └── src │ └── main │ ├── resources │ └── com │ │ └── github │ │ └── tdesjardins │ │ └── ol3 │ │ └── demo │ │ ├── GwtOLPlayground.gwt.xml │ │ └── public │ │ └── index.html │ └── java │ └── com │ └── github │ └── tdesjardins │ └── ol3 │ └── demo │ └── client │ ├── example │ └── Example.java │ └── constants │ └── DemoConstants.java └── .github └── workflows ├── build.yml └── deploy-snapshot.yml /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | .project 3 | .classpath 4 | .settings/ 5 | target/ 6 | -------------------------------------------------------------------------------- /site.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | mvn clean package 4 | mvn --non-recursive com.github.github:site-maven-plugin:site 5 | -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$1" ]; 3 | then echo "usage: release.sh " 4 | else mvn release:prepare release:perform -DreleaseVersion=$1 -Dtag=v$1 5 | fi 6 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/resources/proj4/GwtProj4.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/resources/ol/GwtOLTest.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/resources/com/github/desjardins/elemental/ElementalExtension.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/resources/com/github/desjardins/gwt/junit/TestUtils.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/resources/proj4/GwtProj4Test.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ci/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | github-ssh 5 | git 6 | 7 | 8 | central-portal-snapshots 9 | ${env.CI_DEPLOY_USERNAME} 10 | ${env.CI_DEPLOY_PASSWORD} 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/resources/ol/GwtOL.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /gwt-ol3-demo/src/main/resources/com/github/tdesjardins/ol3/demo/GwtOLPlayground.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # Workflow for simple build with test 2 | 3 | name: Build 4 | 5 | on: 6 | push: 7 | branches: [ main ] 8 | pull_request: 9 | branches: [ main ] 10 | 11 | jobs: 12 | build: 13 | 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v6 18 | - name: Set up JDK 11 19 | uses: actions/setup-java@v5 20 | with: 21 | java-version: '11' 22 | distribution: 'temurin' 23 | cache: maven 24 | - name: Build with Maven 25 | run: mvn -B package -Dmaven.test.skip=true --file pom.xml 26 | -------------------------------------------------------------------------------- /.github/workflows/deploy-snapshot.yml: -------------------------------------------------------------------------------- 1 | # Workflow for dev snapshot deployment 2 | 3 | name: snapshot 4 | 5 | on: 6 | push: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v6 16 | - name: Set up JDK 11 17 | uses: actions/setup-java@v5 18 | with: 19 | java-version: '11' 20 | distribution: 'temurin' 21 | cache: maven 22 | - name: Deploy snapshot with Maven 23 | env: 24 | CI_DEPLOY_USERNAME: ${{ secrets.DEPLOY_USER }} 25 | CI_DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }} 26 | run: mvn -s ci/settings.xml clean deploy -Dmaven.test.skip=true -Dinvoker.skip=true 27 | -------------------------------------------------------------------------------- /gwt-ol3-demo/src/main/resources/com/github/tdesjardins/ol3/demo/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | GWT-OL Playground 11 | 12 | 13 | 14 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/VectorTile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * VectorTile. 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class VectorTile extends Tile { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/Graticule.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class Graticule extends Vector {} 27 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/Image.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class Image extends Source { 27 | } 28 | 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/EventsKey.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Key to use with {@link ol.Observable#unByKey}. 22 | * 23 | * @author sbaumhekel 24 | */ 25 | @JsType(isNative = true) 26 | public interface EventsKey {} 27 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/ImageBase.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2017, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | import ol.events.EventTarget; 20 | 21 | /** 22 | * @author Tino Desjardins 23 | */ 24 | @JsType(isNative = true) 25 | public interface ImageBase extends EventTarget {} 26 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/Disposable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2017, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Objects that need to clean up after themselves. 22 | * 23 | * @author Tino Desjardins 24 | */ 25 | @JsType(isNative = true) 26 | public interface Disposable {} 27 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DragRotate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class DragRotate extends Pointer { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/PinchRotate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class PinchRotate extends Pointer { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/PinchZoom.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class PinchZoom extends Pointer { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/KeyboardPan.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class KeyboardPan extends Interaction { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/KeyboardZoom.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class KeyboardZoom extends Interaction { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DoubleClickZoom.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class DoubleClickZoom extends Interaction { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DragRotateAndZoom.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class DragRotateAndZoom extends Pointer { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/Options.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Generic marker interface for options. 22 | * 23 | * @author sbaumhekel 24 | * @author Tino Desjardins 25 | * 26 | */ 27 | @JsType(isNative = true) 28 | public interface Options { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/easing/EasingOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | *******************************************************************************/ 14 | 15 | package ol.easing; 16 | 17 | import jsinterop.annotations.JsFunction; 18 | 19 | /** 20 | * @author Markus Brigl (markus.brigl@tol.info) 21 | */ 22 | @FunctionalInterface 23 | @JsFunction 24 | public interface EasingOperation { 25 | 26 | boolean easing(double value); 27 | } 28 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/RasterOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | 20 | /** 21 | * @author Daniel Eggert (daniel.eggert@gfz-potsdam.de) 22 | */ 23 | @FunctionalInterface 24 | @JsFunction 25 | public interface RasterOperation { 26 | 27 | R call(R[] values); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/Image.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsMethod; 19 | import jsinterop.annotations.JsType; 20 | 21 | /** 22 | * @author Peter Zanetti 23 | */ 24 | @JsType(isNative = true) 25 | public class Image implements ImageBase { 26 | 27 | @JsMethod 28 | public native void load(); 29 | } 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/Gpx.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * GPX feature format. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true, name = "GPX") 27 | public class Gpx extends XmlFeature { 28 | 29 | public Gpx() {} 30 | 31 | } 32 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/DragBoxEndConditionFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | 20 | /** 21 | * @author gkresic 22 | */ 23 | @FunctionalInterface 24 | @JsFunction 25 | public interface DragBoxEndConditionFunction { 26 | boolean call(MapBrowserEvent event, Pixel pixel1, Pixel pixel2); 27 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/ImageTile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import com.google.gwt.dom.client.ImageElement; 19 | 20 | import jsinterop.annotations.JsType; 21 | 22 | /** 23 | * 24 | * ImageTile. 25 | * 26 | */ 27 | @JsType(isNative = true) 28 | public class ImageTile extends Tile { 29 | 30 | public native ImageElement getImage(); 31 | } 32 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/Params.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | import jsinterop.base.JsPropertyMap; 20 | 21 | /** 22 | * Interface for parameters. 23 | * 24 | * @author Tino Desjardins 25 | * 26 | */ 27 | @JsType(isNative = true) 28 | public interface Params extends JsPropertyMap { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/SelectFilterFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.layer.Layer; 20 | 21 | /** 22 | * @author mribeiro 23 | * 25-11-2016. 24 | */ 25 | @FunctionalInterface 26 | @JsFunction 27 | public interface SelectFilterFunction { 28 | boolean call(Feature feature, Layer layer); 29 | } 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/control/Rotate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class Rotate extends Control { 27 | 28 | public Rotate() {} 29 | 30 | public Rotate(RotateOptions rotateOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/Tile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class Tile extends Layer { 27 | 28 | public Tile() {} 29 | 30 | public Tile(LayerOptions layerOptions) { 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/events/EventTarget.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2017, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.events; 17 | 18 | import jsinterop.annotations.JsType; 19 | import ol.Disposable; 20 | 21 | /** 22 | * A simplified implementation of the W3C DOM Level 2 EventTarget interface. 23 | * 24 | * @author Tino Desjardins 25 | */ 26 | @JsType(isNative = true) 27 | public interface EventTarget extends Disposable {} 28 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DragPan.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2022 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class DragPan extends Pointer { 27 | 28 | public DragPan() {} 29 | 30 | public DragPan(DragPanOptions dragBoxOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/Image.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class Image extends Layer { 27 | 28 | public Image() {} 29 | 30 | public Image(LayerOptions layerOptions) { 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/GenericFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | 20 | /** 21 | * @author mribeiro 22 | * 23 | * @param type of the functions input parameter 24 | * @param return type of the function 25 | */ 26 | @FunctionalInterface 27 | @JsFunction 28 | public interface GenericFunction { 29 | E call(T object); 30 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DragZoom.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class DragZoom extends DragBox { 27 | 28 | public DragZoom() {} 29 | 30 | public DragZoom(DragZoomOptions dragZoomOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/control/FullScreen.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class FullScreen extends Control { 27 | 28 | public FullScreen() {} 29 | 30 | public FullScreen(FullScreenOptions fullScreenOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/control/ZoomSlider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class ZoomSlider extends Control { 27 | 28 | public ZoomSlider() {} 29 | 30 | public ZoomSlider(ZoomSliderOptions zoomSliderOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/ImageMapGuide.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Source for images from Mapguide servers. 22 | * @author tlochmann 23 | */ 24 | @JsType(isNative = true) 25 | public class ImageMapGuide extends Image { 26 | 27 | public ImageMapGuide(ImageMapGuideOptions imageMapGuideOptions) {} 28 | 29 | } 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/ImageStatic.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class ImageStatic extends Image { 27 | 28 | public ImageStatic() {} 29 | 30 | public ImageStatic(ImageStaticOptions imageStaticOptions) {} 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/control/ZoomToExtent.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class ZoomToExtent extends Control { 27 | 28 | public ZoomToExtent() {} 29 | 30 | public ZoomToExtent(ZoomToExtentOptions zoomToExtentOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/VectorLayerOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsType; 20 | 21 | /** 22 | * Vector layer options. 23 | * 24 | * @author sbaumhekel 25 | * 26 | */ 27 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 28 | public class VectorLayerOptions extends BaseVectorLayerOptions {} 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileArcGisRestOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsType; 20 | 21 | /** 22 | * Options for ArcGIS Rest services with tile data. 23 | */ 24 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 25 | public class TileArcGisRestOptions extends TileImageOptions { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/Kml.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * KML format 22 | * 23 | * see https://openlayers.org/en/latest/apidoc/module-ol_format_KML-KML.html 24 | */ 25 | @JsType(isNative = true, name = "KML") 26 | public class Kml extends XmlFeature { 27 | 28 | public Kml() {} 29 | 30 | public Kml(KmlOptions kmlOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/tilegrid/WmtsTileGrid.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.tilegrid; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true, name = "WMTS") 26 | public class WmtsTileGrid extends TileGrid { 27 | 28 | public WmtsTileGrid() {} 29 | 30 | public WmtsTileGrid(WmtsTileGridOptions wmtsTileGridOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-demo/src/main/java/com/github/tdesjardins/ol3/demo/client/example/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.github.tdesjardins.ol3.demo.client.example; 17 | 18 | /** 19 | * 20 | * @author Tino Desjardins 21 | * 22 | */ 23 | public interface Example { 24 | 25 | /** 26 | * Builds and shows the example. 27 | * 28 | * @param exampleId ID of the example 29 | */ 30 | void show(String exampleId); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/com/github/desjardins/elemental/XMLSerializer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.github.desjardins.elemental; 17 | 18 | import elemental2.dom.Node; 19 | import jsinterop.annotations.JsPackage; 20 | import jsinterop.annotations.JsType; 21 | 22 | 23 | @JsType(isNative = true, namespace = JsPackage.GLOBAL) 24 | public class XMLSerializer { 25 | 26 | public native String serializeToString(Node node); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/MouseWheelZoom.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2024 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class MouseWheelZoom extends Interaction { 27 | 28 | public MouseWheelZoom() {} 29 | 30 | public MouseWheelZoom(MouseWheelZoomOptions mouseWheelZoomOptions) {} 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/GeometryFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2025 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.geom.Geometry; 20 | 21 | /** 22 | * The {@link GeometryFunction} class 23 | * 24 | * @author elena guandalini 25 | */ 26 | @FunctionalInterface 27 | @JsFunction 28 | public interface GeometryFunction { 29 | 30 | R call(Coordinate[] coordinates, G geometry); 31 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/event/MeasureListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2015 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.event; 17 | 18 | /** 19 | * A listener for map movements. 20 | * 21 | * @author sbaumhekel 22 | */ 23 | public interface MeasureListener { 24 | 25 | /** 26 | * Fired on a change and the end of a measuring. 27 | * 28 | * @param evt 29 | * {@link MeasureEvent} 30 | */ 31 | void onMeasure(MeasureEvent evt); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/has/HasTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.has; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | public class HasTest extends GwtOLBaseTestCase { 26 | 27 | 28 | public void testHas() { 29 | 30 | this.injectUrlAndTest(() -> { 31 | 32 | assert(Has.getDevicePixelRatio() > 0); 33 | 34 | }); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/Osm.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Layer source for the OpenStreetMap tile server. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true, name = "OSM") 27 | public class Osm extends Xyz { 28 | 29 | public Osm() {} 30 | 31 | public Osm(XyzOptions osmSourceOptions) {} 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/JsonFeature.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Abstract base class; normally only used for creating subclasses and not instantiated in apps. Base class for JSON feature formats. 22 | * 23 | * @author tlochmann 24 | * * 25 | */ 26 | @JsType(isNative = true, name = "JSONFeature") 27 | public abstract class JsonFeature extends Feature { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileLoadFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.ImageTile; 20 | 21 | /** 22 | * 23 | * 24 | * The TileLoadFunction is used to hook into 25 | * 26 | * @author Peter Zanetti 27 | */ 28 | @FunctionalInterface 29 | @JsFunction 30 | public interface TileLoadFunction { 31 | 32 | void loadTile(ImageTile imageTile, String src); 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/Not.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a logical Not operator for a filter condition. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class Not extends Filter { 28 | 29 | public Not(Filter condition) { 30 | super("Not"); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/VectorTileLayerOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | 20 | import jsinterop.annotations.JsType; 21 | 22 | /** 23 | * Vector tile layer options. 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class VectorTileLayerOptions extends BaseVectorLayerOptions {} 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/loadingstrategy/LoadingStrategyFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2023 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.loadingstrategy; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.Extent; 20 | 21 | @FunctionalInterface 22 | @JsFunction 23 | public interface LoadingStrategyFunction { 24 | 25 | /** 26 | * 27 | * @param extent 28 | * @param resolution 29 | * @return 30 | */ 31 | Extent[] getExtents(Extent extent, double resolution); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/style/OrderFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.Feature; 20 | 21 | /** 22 | * A function to be used when sorting features before rendering. 23 | * 24 | * @author TDesjardins 25 | * 26 | */ 27 | @FunctionalInterface 28 | @JsFunction 29 | public interface OrderFunction { 30 | 31 | double sort(Feature feature1, Feature feature2); 32 | 33 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/GraticuleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import ol.layer.Graticule; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | public class GraticuleTest extends GwtOLBaseTestCase { 26 | 27 | public void testGraticule() { 28 | 29 | injectUrlAndTest(() -> { 30 | 31 | Graticule graticule = new Graticule(); 32 | 33 | assertNotNull(graticule); 34 | }); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/IsNull.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a PropertyIsNull comparison operator. 22 | * 23 | * @author hmgn 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class IsNull extends Comparison { 28 | 29 | public IsNull(String propertyName) { 30 | super("PropertyIsNull", propertyName); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/style/OrderFunctionRender.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.render.Feature; 20 | 21 | /** 22 | * A function to be used when sorting features before rendering. 23 | * 24 | * @author TDesjardins 25 | * 26 | */ 27 | @FunctionalInterface 28 | @JsFunction 29 | public interface OrderFunctionRender { 30 | 31 | double sort(Feature feature1, Feature feature2); 32 | 33 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/ForEachFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2022 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | 20 | /** 21 | * Callback for {@link Collection#forEach(ForEachFunction)} 22 | */ 23 | @FunctionalInterface 24 | @JsFunction 25 | public interface ForEachFunction { 26 | 27 | /** 28 | * @param item current item 29 | * @param index current index 30 | * @param array array 31 | */ 32 | void call(T item, int index, T[] array); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DrawMode.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Draw mode. This collapses multi-part geometry types with their single-part 22 | * 23 | * @author Peter Zanetti 24 | * 25 | * https://github.com/openlayers/ol3/blob/master/src/ol/interaction/draw.js 26 | * 27 | */ 28 | @JsType 29 | public enum DrawMode { 30 | Point, 31 | LineString, 32 | Polygon, 33 | Circle 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/OsmXml.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsType; 19 | import ol.Options; 20 | 21 | /** 22 | * OSM-XML format 23 | * 24 | * @author mazlixek 25 | * 26 | * see http://openlayers.org/en/latest/apidoc/ol.format.OSMXML.html 27 | */ 28 | @JsType(isNative = true, name = "OSMXML") 29 | public class OsmXml extends XmlFeature { 30 | 31 | public OsmXml() {} 32 | 33 | public OsmXml(Options osmXmlOptions) {} 34 | 35 | } 36 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/And.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a logical And operator 22 | * between two or more filter conditions. 23 | * 24 | * @author hmgn 25 | * 26 | */ 27 | @JsType(isNative = true) 28 | public class And extends LogicalNary { 29 | 30 | public And(Filter... conditions) { 31 | //super("And", conditions); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/WmsGetFeatureInfo.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Format for reading WMSGetFeatureInfo format. It uses GML2 to read features. 22 | */ 23 | @JsType(isNative = true, name = "WMSGetFeatureInfo") 24 | public class WmsGetFeatureInfo extends XmlFeature { 25 | 26 | public WmsGetFeatureInfo() {} 27 | 28 | public WmsGetFeatureInfo(WmsGetFeatureInfoOptions wmsGetFeatureInfoOptions) {} 29 | 30 | } 31 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/IsLike.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a PropertyIsLike comparison operator. 22 | * 23 | * @author hmgn 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class IsLike extends Comparison { 28 | 29 | public IsLike(String propertyName, String pattern) { 30 | super("PropertyIsLike", propertyName); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/control/AttributionTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | public class AttributionTest extends GwtOLBaseTestCase { 26 | 27 | public void testAttribution() { 28 | 29 | this.injectUrlAndTest(() -> { 30 | Attribution attribution = new Attribution(); 31 | assertNotNull(attribution); 32 | }); 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/proj4/GwtProj4BaseTestCase.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package proj4; 17 | 18 | import com.github.desjardins.gwt.junit.client.BaseTestCase; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | public abstract class GwtProj4BaseTestCase extends BaseTestCase { 26 | 27 | public GwtProj4BaseTestCase() { 28 | super("https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4.js", "proj4.GwtProj4Test", 10000); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/Or.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a logical Or operator 22 | * between two or more filter conditions. 23 | * 24 | * @author Tino Desjardins 25 | * 26 | */ 27 | @JsType(isNative = true) 28 | public class Or extends LogicalNary { 29 | 30 | public Or(Filter... conditions) { 31 | //super("Or", conditions); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileUrlFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.TileCoord; 20 | import ol.proj.Projection; 21 | 22 | /** 23 | * 24 | * 25 | * The TileUrlFunction is used to hook into 26 | * 27 | * @author Peter Zanetti 28 | */ 29 | @FunctionalInterface 30 | @JsFunction 31 | public interface TileUrlFunction { 32 | 33 | String getUrl(TileCoord tileCoord, double pixelRatio, Projection projection); 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/KineticTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2022 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | /** 19 | * Test for {@link ol.Kinetic}. 20 | * 21 | * @author Tino Desjardins 22 | * 23 | */ 24 | public class KineticTest extends GwtOLBaseTestCase { 25 | 26 | public void testKinetic() { 27 | 28 | injectUrlAndTest(() -> { 29 | 30 | Kinetic kinetic = new Kinetic(-0.005, 0.05, 100); 31 | assertNotNull(kinetic); 32 | 33 | }); 34 | 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/ImageArcGisRest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Source for data from ArcGIS Rest services providing single, untiled images. 22 | * 23 | * @author Peter Zanetti 24 | */ 25 | @JsType(isNative = true, name = "ImageArcGISRest") 26 | public class ImageArcGisRest extends Image { 27 | 28 | public ImageArcGisRest(ImageArcGisRestOptions options) {} 29 | 30 | public native ImageLoadFunction getImageLoadFunction(); 31 | } 32 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/BingMaps.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Layer source for the Bing Maps tile server. 22 | * 23 | * @author gkresic 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class BingMaps extends TileImage { 28 | 29 | public BingMaps() {} 30 | 31 | public BingMaps(BingMapsOptions bingSourceOptions) {} 32 | 33 | public native String getApiKey(); 34 | 35 | public native String getImagerySet(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/control/Attribution.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class Attribution extends Control { 27 | 28 | public Attribution() {} 29 | 30 | public Attribution(AttributionOptions attributionOptions) {} 31 | 32 | public native void setCollapsed(boolean collapsed); 33 | 34 | public native void setCollapsible(boolean collapsible); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/LessThan.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a PropertyIsLessThan comparison operator. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class LessThan extends ComparisonBinary { 28 | 29 | public LessThan(String propertyName, Number expression) { 30 | super("PropertyIsLessThan", propertyName, expression); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/style/Circle.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Set circle style for vector features. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class Circle extends RegularShape { 28 | 29 | public Circle(CircleOptions circleOptions) {} 30 | 31 | /** 32 | * Circle radius. Required. 33 | * 34 | * @param radius radius 35 | */ 36 | public native void setRadius(double radius); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/webgl/WebGLTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.webgl; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * 22 | * @author Tino Desjardins 23 | * 24 | */ 25 | public class WebGLTest extends GwtOLBaseTestCase { 26 | 27 | public void testWebGL() { 28 | 29 | injectUrlAndTest(new TestWithInjection() { 30 | 31 | @Override 32 | public void test() { 33 | 34 | assert(WebGL.getArrayBuffer() > 0); 35 | 36 | } 37 | 38 | }); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-demo/src/main/java/com/github/tdesjardins/ol3/demo/client/constants/DemoConstants.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.github.tdesjardins.ol3.demo.client.constants; 17 | 18 | /** 19 | * 20 | * @author Tino Desjardins 21 | * 22 | */ 23 | public final class DemoConstants { 24 | 25 | public static final String EPSG_4326 = "EPSG:4326"; 26 | public static final String EPSG_3857 = "EPSG:3857"; 27 | 28 | public static final String MAP_DIV = "map"; 29 | 30 | private DemoConstants() { 31 | throw new AssertionError(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/control/Zoom.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * A control with 2 buttons, one for zoom in and one for zoom out. This control 22 | * is one of the default controls of a map. To style this control use css 23 | * selectors `.ol-zoom-in` and `.ol-zoom-out`. 24 | * 25 | * @author sbaumhekel 26 | */ 27 | @JsType(isNative = true) 28 | public class Zoom extends Control { 29 | 30 | public Zoom() {} 31 | 32 | public Zoom(ZoomOptions zoomOptions) {} 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/GreaterThan.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a PropertyIsGreaterThan comparison operator. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class GreaterThan extends ComparisonBinary { 28 | 29 | public GreaterThan(String propertyName, Number expression) { 30 | super("PropertyIsGreaterThan", propertyName, expression); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/webgl/WebGL.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.webgl; 17 | 18 | import jsinterop.annotations.JsOverlay; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | 22 | /** 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class WebGL { 27 | 28 | @JsOverlay 29 | private static final String PACKAGE_WEB_GL = "ol.webgl"; 30 | 31 | @JsProperty(name = "ARRAY_BUFFER", namespace = PACKAGE_WEB_GL) 32 | public static native int getArrayBuffer(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/FeatureAtPixelOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsType; 20 | 21 | /** 22 | * Options for customizing {@link PluggableMap#forEachFeatureAtPixel(Pixel, FeatureAtPixelFunction, AtPixelOptions)} 23 | * 24 | * @author gkresic 25 | * 26 | * @deprecated Use {@link AtPixelOptions} instead. 27 | */ 28 | @Deprecated 29 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 30 | public class FeatureAtPixelOptions extends AtPixelOptions { 31 | } 32 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/tilegrid/WmtsTileGridOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.tilegrid; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | 22 | /** 23 | * {@link TileGrid} options. 24 | * 25 | * @author Tino Desjardins 26 | */ 27 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 28 | public class WmtsTileGridOptions extends TileGridOptions { 29 | 30 | @JsProperty 31 | public native void setMatrixIds(String[] matrixIds); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/loadingstrategy/LoadingStrategyTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2023 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.loadingstrategy; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * Test for loading strategies. 22 | * 23 | * @author TDesjardins 24 | * 25 | */ 26 | public class LoadingStrategyTest extends GwtOLBaseTestCase { 27 | 28 | public void testLoadinStrategy() { 29 | 30 | this.injectUrlAndTest(() -> { 31 | 32 | assertNotNull(LoadingStrategy.getAll()); 33 | assertNotNull(LoadingStrategy.getBbox()); 34 | 35 | }); 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/proj4/GwtProj4TestSuite.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package proj4; 17 | 18 | import com.google.gwt.junit.tools.GWTTestSuite; 19 | import junit.framework.TestSuite; 20 | 21 | /** 22 | * Testsuite for GwtOL3. 23 | * 24 | * @author Tino Desjardins 25 | * 26 | */ 27 | public class GwtProj4TestSuite extends GWTTestSuite { 28 | 29 | public static TestSuite suite() { 30 | 31 | TestSuite suite = new TestSuite("Tests for GwtProj4-Wrapper"); 32 | 33 | suite.addTestSuite(Proj4Test.class); 34 | 35 | return suite; 36 | 37 | } 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/LessThanOrEqualTo.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a PropertyIsLessThanOrEqualTo comparison operator. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class LessThanOrEqualTo extends ComparisonBinary { 28 | 29 | public LessThanOrEqualTo(String propertyName, Number expression) { 30 | super("PropertyIsLessThanOrEqualTo", propertyName, expression); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileImage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | import ol.proj.Projection; 20 | import ol.tilegrid.TileGrid; 21 | 22 | /** 23 | * Base class for sources providing images divided into a tile grid. 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true) 29 | public class TileImage extends UrlTile { 30 | 31 | public native void setRenderReprojectionEdges(boolean render); 32 | 33 | public native void setTileGridForProjection(Projection projection, TileGrid tilegrid); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/GwtOLBaseTestCase.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import com.github.desjardins.gwt.junit.client.BaseTestCase; 19 | 20 | import java.util.Arrays; 21 | 22 | /** 23 | * 24 | * @author Tino Desjardins 25 | * 26 | */ 27 | public abstract class GwtOLBaseTestCase extends BaseTestCase { 28 | 29 | public GwtOLBaseTestCase() { 30 | 31 | super(Arrays.asList( 32 | "//cdn.jsdelivr.net/npm/ol@10.7.0/dist/ol.min.js"), 33 | "ol.GwtOLTest", 34 | 10000); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/format/GpxTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * 22 | * A test case for {@link ol.format.Gpx}. 23 | * 24 | */ 25 | public class GpxTest extends GwtOLBaseTestCase { 26 | 27 | public void testReadFeatureCollectionFromOsmXml() { 28 | 29 | injectUrlAndTest(() -> { 30 | 31 | Gpx gpx = new Gpx(); 32 | 33 | assertNotNull(gpx); 34 | assertTrue(gpx instanceof ol.format.Feature); 35 | 36 | }); 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/geom/GeometryType.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.geom; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * The geometry type enumeration representing ol.geom.GeometryType. 22 | * 23 | * @author Peter Zanetti 24 | * 25 | * see https://github.com/openlayers/ol3/blob/master/src/ol/geom/geometry.js 26 | * 27 | */ 28 | @JsType 29 | public enum GeometryType { 30 | 31 | Point, 32 | LineString, 33 | LinearRing, 34 | Polygon, 35 | MultiPoint, 36 | MultiLineString, 37 | MultiPolygon, 38 | GeometryCollection, 39 | Circle 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/Kinetic.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2022 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Implementation of inertial deceleration for map movement. 22 | */ 23 | @JsType(isNative = true) 24 | public class Kinetic { 25 | 26 | /** 27 | * 28 | * @param decay Rate of decay (must be negative). 29 | * @param minVelocity Minimum velocity (pixels/millisecond). 30 | * @param delay Delay to consider to calculate the kinetic initial values (milliseconds). 31 | */ 32 | public Kinetic(double decay, double minVelocity, int delay) {} 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/GreaterThanOrEqualTo.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a PropertyIsGreaterThanOrEqualTo comparison operator. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class GreaterThanOrEqualTo extends ComparisonBinary { 28 | 29 | public GreaterThanOrEqualTo(String propertyName, Number expression) { 30 | super("PropertyIsGreaterThanOrEqualTo", propertyName, expression); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileWmsParams.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | /** 17 | * 18 | * @author mribeiro 19 | * 20 | */ 21 | package ol.source; 22 | 23 | import jsinterop.annotations.JsPackage; 24 | import jsinterop.annotations.JsProperty; 25 | import jsinterop.annotations.JsType; 26 | 27 | /** 28 | * 29 | */ 30 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 31 | public class TileWmsParams extends ImageWmsParams { 32 | 33 | /** 34 | * 35 | * @param tiled 36 | */ 37 | @JsProperty(name = "TILED") 38 | public native void setTiled(boolean tiled); 39 | 40 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/Feature.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Abstract base class; normally only used for creating subclasses and not instantiated in apps. Base class for feature formats. 22 | * {ol.format.Feature} subclasses provide the ability to decode and encode ol.Feature objects from a variety of commonly used geospatial 23 | * file formats. See the documentation for each format for more details. 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true) 29 | public abstract class Feature {} 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/control/RotateTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Object; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class RotateTest extends GwtOLBaseTestCase { 27 | 28 | public void testRotate() { 29 | 30 | injectUrlAndTest(() -> { 31 | Rotate rotate = new Rotate(); 32 | 33 | assertNotNull(rotate); 34 | assertTrue(rotate instanceof Object); 35 | assertTrue(rotate instanceof Control); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/ImageLoadFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.Image; 20 | 21 | /** 22 | * A function that takes an ol.Image for the image and a {string} for the src as arguments. It is supposed to make it so the underlying image ol.Image#getImage 23 | * is assigned the content specified by the src. If not specified, the default is 24 | * 25 | * @author Peter Zanetti 26 | */ 27 | @FunctionalInterface 28 | @JsFunction 29 | public interface ImageLoadFunction { 30 | 31 | public void loadImage(Image image, String src); 32 | } 33 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileArcGisRest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Layer source for tile data from ArcGIS Rest services. Map and Image Services are supported. 22 | * For cached ArcGIS services, better performance is available using the 23 | * {@link ol.source.Xyz} data source. 24 | * 25 | */ 26 | @JsType(isNative = true, name = "TileArcGISRest") 27 | public class TileArcGisRest extends TileImage { 28 | 29 | public TileArcGisRest() {} 30 | 31 | public TileArcGisRest(TileArcGisRestOptions tileArcGisRestOptions) {} 32 | 33 | } 34 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/HeatmapWeightFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.Feature; 20 | 21 | /** 22 | * A function that returns a weight from a feature. Weight values should range 23 | * from 0 to 1 (and values outside will be clamped to that range) 24 | */ 25 | @FunctionalInterface 26 | @JsFunction 27 | public interface HeatmapWeightFunction { 28 | 29 | /** 30 | * @param feature feature for calculating the weight 31 | * @return weight 32 | */ 33 | double getWeight(Feature feature); 34 | 35 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/TextFeature.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Abstract base class; normally only used for creating subclasses and not instantiated in apps. Base class for feature formats. 22 | * {ol.format.Feature} subclasses provide the ability to decode and encode ol.Feature objects from a variety of commonly used geospatial 23 | * file formats. See the documentation for each format for more details. 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true) 29 | public abstract class TextFeature extends Feature {} 30 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/control/FullScreenTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Object; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class FullScreenTest extends GwtOLBaseTestCase { 27 | 28 | public void testFullScreen() { 29 | 30 | injectUrlAndTest(() -> { 31 | FullScreen fullScreen = new FullScreen(); 32 | 33 | assertNotNull(fullScreen); 34 | assertTrue(fullScreen instanceof Object); 35 | assertTrue(fullScreen instanceof Control); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/event/EventListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.event; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.events.Event; 20 | 21 | /** 22 | * A listener for events of the given type. 23 | * 24 | * @author sbaumhekel 25 | * @author Tino Desjardins 26 | * 27 | * @param 28 | * event type 29 | */ 30 | @FunctionalInterface 31 | @JsFunction 32 | public interface EventListener { 33 | 34 | /** 35 | * Is called when an event is received. 36 | * 37 | * @param event 38 | * event 39 | */ 40 | void onEvent(E event); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileDebug.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * A pseudo tile source, which does not fetch tiles from a server, but renders a 22 | * grid outline for the tile grid/projection along with the coordinates for each 23 | * tile. See examples/canvas-tiles for an example. 24 | * 25 | * Uses Canvas context2d, so requires Canvas support. 26 | * 27 | * @author Tino Desjardins 28 | * 29 | */ 30 | @JsType(isNative = true) 31 | public class TileDebug extends Tile { 32 | 33 | public TileDebug(TileDebugOptions tileDebugOptions) {} 34 | 35 | } 36 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/control/ZoomSliderTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Object; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class ZoomSliderTest extends GwtOLBaseTestCase { 27 | 28 | public void testZoomSlider() { 29 | 30 | injectUrlAndTest(() -> { 31 | ZoomSlider zoomSlider = new ZoomSlider(); 32 | 33 | assertNotNull(zoomSlider); 34 | assertTrue(zoomSlider instanceof Object); 35 | assertTrue(zoomSlider instanceof Control); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/format/MvtTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * Test for Mapbox Vector Tile (MVT) format. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class MvtTest extends GwtOLBaseTestCase { 27 | 28 | public void testMvt() { 29 | 30 | injectUrlAndTest(() -> { 31 | 32 | Mvt mvt = new Mvt(); 33 | assertNotNull(mvt); 34 | 35 | MvtOptions mvtOptions = new MvtOptions(); 36 | Mvt mvt2 = new Mvt(mvtOptions); 37 | assertNotNull(mvt2); 38 | 39 | }); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DrawEventType.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * The draw event type. 22 | * 23 | * @author Peter Zanetti 24 | * 25 | * see https://github.com/openlayers/ol3/blob/master/src/ol/interaction/draw.js 26 | * 27 | */ 28 | @JsType 29 | public enum DrawEventType { 30 | 31 | /** 32 | * Triggered upon feature draw start see ol.interaction.Draw.Event#drawstart 33 | */ 34 | drawstart, 35 | 36 | /** 37 | * Triggered upon feature draw end see ol.interaction.Draw.Event#drawend 38 | */ 39 | drawend 40 | 41 | } 42 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/PinchZoomTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class PinchZoomTest extends GwtOLBaseTestCase { 27 | 28 | public void testPinchZoom() { 29 | 30 | injectUrlAndTest(() -> { 31 | PinchZoom pinchZoom = new PinchZoom(); 32 | 33 | assertNotNull(pinchZoom); 34 | assertTrue(pinchZoom instanceof Observable); 35 | assertTrue(pinchZoom instanceof Interaction); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/control/ZoomToExtentTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Object; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class ZoomToExtentTest extends GwtOLBaseTestCase { 27 | 28 | public void testZoomToExtent() { 29 | 30 | injectUrlAndTest(() -> { 31 | ZoomToExtent zoomToExtent = new ZoomToExtent(); 32 | 33 | assertNotNull(zoomToExtent); 34 | assertTrue(zoomToExtent instanceof Object); 35 | assertTrue(zoomToExtent instanceof Control); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/source/VectorTileTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * A test case for {@link ol.source.VectorTile}. 22 | * 23 | * @author gkresic 24 | */ 25 | public class VectorTileTest extends GwtOLBaseTestCase { 26 | 27 | public void testVectorTile() { 28 | 29 | injectUrlAndTest(() -> { 30 | 31 | VectorTileOptions options = new VectorTileOptions(); 32 | assertNotNull(options); 33 | 34 | VectorTile source = new VectorTile(options); 35 | assertNotNull(source); 36 | 37 | }); 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/MapEvent.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsProperty; 19 | 20 | import jsinterop.annotations.JsType; 21 | import ol.events.Event; 22 | 23 | /** 24 | * Events emitted as map events are instances of this type. See {@link ol.PluggableMap} 25 | * for which events trigger a map event. 26 | * 27 | * @author sbaumhekel 28 | */ 29 | @JsType(isNative = true) 30 | public interface MapEvent extends Event { 31 | 32 | /** 33 | * The map where the event occurred. 34 | * 35 | * @return {@link ol.PluggableMap} 36 | */ 37 | @JsProperty 38 | PluggableMap getMap(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/MvtOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsType; 20 | import jsinterop.annotations.JsProperty; 21 | import ol.Options; 22 | 23 | /** 24 | * Options for Mapbox MVT format. 25 | * 26 | * @author tlochmann 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class MvtOptions implements Options { 30 | 31 | /** 32 | * @param geometryName 33 | */ 34 | @JsProperty 35 | public native void setGeometryName(String geometryName); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/DragAndDropTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class DragAndDropTest extends GwtOLBaseTestCase { 27 | 28 | public void testDragAndDrop() { 29 | 30 | injectUrlAndTest(() -> { 31 | DragAndDrop dragAndDrop = new DragAndDrop(); 32 | 33 | assertNotNull(dragAndDrop); 34 | assertTrue(dragAndDrop instanceof Observable); 35 | assertTrue(dragAndDrop instanceof Interaction); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/interaction/DragAndDrop.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import jsinterop.annotations.JsProperty; 19 | import jsinterop.annotations.JsType; 20 | import ol.Feature; 21 | import ol.proj.Projection; 22 | 23 | /** 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true) 29 | public class DragAndDrop extends Interaction { 30 | 31 | @JsType(isNative = true) 32 | public interface Event extends ol.events.Event { 33 | 34 | @JsProperty 35 | public Feature[] getFeatures(); 36 | 37 | @JsProperty 38 | public Projection getProjection(); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/Vector.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Vector data that is rendered client-side. Note that any property set in the 22 | * options is set as a {@link ol.Object} property on the layer object; for 23 | * example, setting `title: 'My Title'` in the options means that `title` is 24 | * observable, and has get/set accessors. 25 | * 26 | * @author Tino Desjardins 27 | * 28 | */ 29 | @JsType(isNative = true) 30 | public class Vector extends BaseVector { 31 | 32 | public Vector() {} 33 | 34 | public Vector(VectorLayerOptions vectorLayerOptions) {} 35 | 36 | } 37 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/KeyboardPanTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class KeyboardPanTest extends GwtOLBaseTestCase { 27 | 28 | public void testKeyboardPan() { 29 | 30 | injectUrlAndTest(() -> { 31 | KeyboardPan keyboardPan = new KeyboardPan(); 32 | 33 | assertNotNull(keyboardPan); 34 | assertTrue(keyboardPan instanceof Observable); 35 | assertTrue(keyboardPan instanceof Interaction); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/PinchRotateTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class PinchRotateTest extends GwtOLBaseTestCase { 27 | 28 | public void testPinchRotate() { 29 | 30 | injectUrlAndTest(() -> { 31 | PinchRotate pinchRotate = new PinchRotate(); 32 | 33 | assertNotNull(pinchRotate); 34 | assertTrue(pinchRotate instanceof Observable); 35 | assertTrue(pinchRotate instanceof Interaction); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/KeyboardZoomTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class KeyboardZoomTest extends GwtOLBaseTestCase { 27 | 28 | public void testKeyboardZoom() { 29 | 30 | injectUrlAndTest(() -> { 31 | KeyboardZoom keyboardZoom = new KeyboardZoom(); 32 | 33 | assertNotNull(keyboardZoom); 34 | assertTrue(keyboardZoom instanceof Observable); 35 | assertTrue(keyboardZoom instanceof Interaction); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/WmsFeatureInfoParams.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | import ol.Params; 22 | 23 | /** 24 | * 25 | * @author Peter Zanetti 26 | * 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class WmsFeatureInfoParams implements Params { 30 | 31 | @JsProperty(name = "QUERY_LAYERS") 32 | public native void setQueryLayers(String layers); 33 | 34 | @JsProperty(name = "INFO_FORMAT") 35 | public native void setInfoFormat(String version); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/style/StyleFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.Feature; 20 | 21 | /** 22 | * A function that takes an {@link ol.Feature} and a number representing the view's resolution. 23 | */ 24 | @FunctionalInterface 25 | @JsFunction 26 | public interface StyleFunction { 27 | 28 | /** 29 | * Creates a style by feature and resolution 30 | * 31 | * @param feature feature to style 32 | * @param resolution resolution of view 33 | * @return style 34 | */ 35 | Style[] createStyle(Feature feature, double resolution); 36 | 37 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/control/OverviewMapTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * A test case for {@link ol.control.OverviewMap}. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class OverviewMapTest extends GwtOLBaseTestCase { 27 | 28 | public void testOverviewMap() { 29 | 30 | this.injectUrlAndTest(() -> { 31 | OverviewMapOptions overviewMapOptions = new OverviewMapOptions(); 32 | OverviewMap overviewMap = new OverviewMap(overviewMapOptions); 33 | assertTrue(overviewMap instanceof OverviewMap); 34 | }); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/geom/LinearRing.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.geom; 17 | 18 | import jsinterop.annotations.JsType; 19 | import ol.Coordinate; 20 | 21 | /** 22 | * LinearRing geometry. 23 | * 24 | * @author sbaumhekel 25 | */ 26 | @JsType(isNative = true) 27 | public class LinearRing extends SimpleGeometryCoordinates { 28 | 29 | public LinearRing(Coordinate[] coordinates) {} 30 | 31 | public LinearRing(Coordinate[] coordinates, String geometryLayout) {} 32 | 33 | /** 34 | * Return the area of the linear ring on projected plane. 35 | * 36 | * @return area (on projected plane). 37 | */ 38 | public native double getArea(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/SnapTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class SnapTest extends GwtOLBaseTestCase { 27 | 28 | public void testSnap() { 29 | 30 | injectUrlAndTest(() -> { 31 | 32 | SnapOptions snapOptions = new SnapOptions(); 33 | Snap snap = new Snap(snapOptions); 34 | 35 | assertNotNull(snap); 36 | assertTrue(snap instanceof Observable); 37 | assertTrue(snap instanceof Interaction); 38 | }); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/DragPanTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2022 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class DragPanTest extends GwtOLBaseTestCase { 27 | 28 | public void testDragPan() { 29 | 30 | injectUrlAndTest(() -> { 31 | DragPan dragPan = new DragPan(); 32 | 33 | assertNotNull(dragPan); 34 | assertTrue(dragPan instanceof Observable); 35 | assertTrue(dragPan instanceof Interaction); 36 | assertEquals(0, dragPan.getPointerCount()); 37 | }); 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/FrameState.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | 22 | /** 23 | * Rendering frame state. 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class FrameState implements Options { 30 | 31 | @JsProperty 32 | public native double getPixelRatio(); 33 | 34 | @JsProperty 35 | public native int getTime(); 36 | 37 | @JsProperty 38 | public native ViewState getViewState(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/OverlayTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | /** 19 | * 20 | * @author Tino Desjardins 21 | * 22 | */ 23 | public class OverlayTest extends GwtOLBaseTestCase { 24 | 25 | public void testOverlay() { 26 | 27 | injectUrlAndTest(() -> { 28 | 29 | OverlayOptions overlayOptions = new OverlayOptions(); 30 | 31 | assertNotNull(overlayOptions); 32 | 33 | Overlay overlay = new Overlay(overlayOptions); 34 | 35 | assertNotNull(overlay); 36 | 37 | assertTrue(overlay instanceof Observable); 38 | assertTrue(overlay instanceof Object); 39 | 40 | }); 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/MouseWheelZoomTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class MouseWheelZoomTest extends GwtOLBaseTestCase { 27 | 28 | public void testMouseWheelZoom() { 29 | 30 | injectUrlAndTest(() -> { 31 | MouseWheelZoom mouseWheelZoom = new MouseWheelZoom(); 32 | 33 | assertNotNull(mouseWheelZoom); 34 | assertTrue(mouseWheelZoom instanceof Observable); 35 | assertTrue(mouseWheelZoom instanceof Interaction); 36 | }); 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/LogicalNary.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Base class for WFS GetFeature n-ary logical filters. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public abstract class LogicalNary extends Filter { 28 | 29 | /** 30 | * @deprecated This constructor is only to satisfy JsInterop. 31 | * Do not use this! 32 | */ 33 | @Deprecated 34 | public LogicalNary() {} 35 | 36 | public LogicalNary(String tagName, Filter... filters) { 37 | //super(tagName); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/layer/VectorTile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Layer for vector tile data that is rendered client-side. Note that any property set 22 | * in the options is set as a {@link ol.Object} property on the layer object; for 23 | * example, setting `title: 'My Title'` in the options means that `title` is 24 | * observable, and has get/set accessors. 25 | * 26 | * @author Tino Desjardins 27 | * 28 | */ 29 | @JsType(isNative = true) 30 | public class VectorTile extends BaseVector { 31 | 32 | public VectorTile() {} 33 | 34 | public VectorTile(VectorTileLayerOptions vectorTileOptions) {} 35 | 36 | } 37 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/style/RenderFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.geom.SimpleGeometryCoordinates; 20 | import ol.render.State; 21 | 22 | /** 23 | * Custom renderer function. 24 | * 25 | * @author TDesjardins 26 | * 27 | */ 28 | @FunctionalInterface 29 | @JsFunction 30 | public interface RenderFunction { 31 | 32 | /** 33 | * @param pixelCoordinates The pixel coordinates of the geometry in GeoJSON notation. 34 | * @param renderState render state of the layer renderer. 35 | */ 36 | void render(SimpleGeometryCoordinates pixelCoordinates, State renderState); 37 | 38 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/featureloader/FeatureLoader.java: -------------------------------------------------------------------------------- 1 | /** ***************************************************************************** 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.featureloader; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.Extent; 20 | import ol.proj.Projection; 21 | 22 | /** 23 | * 24 | * A function that takes an {@link ol.Extent} representing the area to be loaded, a number representing the 25 | * view's resolution and a {@link ol.proj.Projection}. 26 | * The function is responsible for loading the features and adding them to the source 27 | * 28 | * @author Fractaliste 29 | */ 30 | @JsFunction 31 | @FunctionalInterface 32 | public interface FeatureLoader { 33 | 34 | void loadFeatures(Extent extent, double resolution, Projection projection); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/FeatureUrlFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2023 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.Extent; 20 | import ol.proj.Projection; 21 | 22 | /** 23 | * 24 | * 25 | * {@link ol.source.Vector} sources use a function of this type to get the url to load features from. 26 | */ 27 | @FunctionalInterface 28 | @JsFunction 29 | public interface FeatureUrlFunction { 30 | 31 | /** 32 | * @param extent area to be loaded 33 | * @param resolution resolution (map units per pixel) 34 | * @param projection projection 35 | * @return URL 36 | */ 37 | String getUrl(Extent extent, double resolution, Projection projection); 38 | } 39 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/WmsGetFeatureInfoOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | import ol.Options; 22 | 23 | /** 24 | * Options for the format WmsGetFeatureInfo. 25 | * 26 | */ 27 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 28 | public class WmsGetFeatureInfoOptions implements Options { 29 | 30 | /** 31 | * 32 | * @param layers if set, only features of the given layers will be returned by the format when read. 33 | */ 34 | @JsProperty 35 | public native void setLayers(String[] layers); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/has/Has.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.has; 17 | 18 | import jsinterop.annotations.JsOverlay; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | 22 | /** 23 | * 24 | */ 25 | @JsType(isNative = true) 26 | public class Has { 27 | 28 | @JsOverlay 29 | private static final String PACKAGE_HAS = "ol.has"; 30 | 31 | /** 32 | * @return The ratio between physical pixels and device-independent pixels (dips) on the device (window.devicePixelRatio). 33 | */ 34 | @JsProperty(name = "DEVICE_PIXEL_RATIO", namespace = PACKAGE_HAS) 35 | public static native double getDevicePixelRatio(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/source/BingMapsTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * A test case for {@link ol.source.BingMaps}. 22 | * 23 | * @author gkresic 24 | */ 25 | public class BingMapsTest extends GwtOLBaseTestCase { 26 | 27 | public void testBingMaps() { 28 | 29 | injectUrlAndTest(() -> { 30 | 31 | BingMapsOptions options = new BingMapsOptions(); 32 | assertNotNull(options); 33 | options.setImagerySet("Aerial"); 34 | 35 | BingMaps source = new BingMaps(options); 36 | 37 | assertEquals("Aerial", source.getImagerySet()); 38 | 39 | }); 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/style/IconImageCacheTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * Test for {@link ol.style.IconImageCache}. 22 | * 23 | * @author Tino Desjardins 24 | */ 25 | public class IconImageCacheTest extends GwtOLBaseTestCase { 26 | 27 | public void testIconImageCache() { 28 | 29 | injectUrlAndTest(() -> { 30 | 31 | 32 | IconImageCache iconImageCache = IconImageCache.get(); 33 | assertNotNull(iconImageCache); 34 | assertEquals(iconImageCache, IconImageCache.get()); 35 | iconImageCache.setSize(128); 36 | 37 | }); 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/FeatureAtPixelFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.layer.Layer; 20 | 21 | /** 22 | * Callback for {@link PluggableMap#forEachFeatureAtPixel(Pixel, FeatureAtPixelFunction, FeatureAtPixelOptions)} 23 | * 24 | * @author gkresic 25 | */ 26 | @FunctionalInterface 27 | @JsFunction 28 | public interface FeatureAtPixelFunction { 29 | 30 | /** 31 | * @param feature feature or render feature at the pixel. 32 | * @param layer layer of the feature (null for unmanaged layers). 33 | * @return To stop detection, callback functions can return a truthy value. 34 | */ 35 | boolean call(Feature feature, Layer layer); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/During.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Represents a During comparison operator. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public class During extends Comparison { 28 | 29 | /** 30 | * 31 | * @param propertyName Name of the context property to compare. 32 | * @param begin The begin date in ISO-8601 format. 33 | * @param end The end date in ISO-8601 format. 34 | */ 35 | public During(String propertyName, String begin, String end) { 36 | super("During", propertyName); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/DragBoxTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class DragBoxTest extends GwtOLBaseTestCase { 27 | 28 | public void testDragBox() { 29 | 30 | 31 | injectUrlAndTest(() -> { 32 | 33 | DragBoxOptions dragBoxOptions = new DragBoxOptions(); 34 | DragBox dragBox = new DragBox(dragBoxOptions); 35 | 36 | assertNotNull(dragBox); 37 | assertTrue(dragBox instanceof Observable); 38 | assertTrue(dragBox instanceof Interaction); 39 | }); 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/DragRotateTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class DragRotateTest extends GwtOLBaseTestCase { 27 | 28 | public void testDragAndDrop() { 29 | 30 | 31 | injectUrlAndTest(() -> { 32 | DragRotate dragRotate = new DragRotate(); 33 | 34 | assertNotNull(dragRotate); 35 | assertTrue(dragRotate instanceof Observable); 36 | assertTrue(dragRotate instanceof Interaction); 37 | assertTrue(dragRotate instanceof Pointer); 38 | }); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/layer/ImageTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * A test case for {@link ol.layer.Image}. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class ImageTest extends GwtOLBaseTestCase { 27 | 28 | @SuppressWarnings({ "static-method", "javadoc" }) 29 | public void testImageLayer() { 30 | 31 | injectUrlAndTest(() -> { 32 | 33 | ImageLayerOptions imageLayerOptions = new ImageLayerOptions(); 34 | assertNotNull(imageLayerOptions); 35 | Image imageLayer = new Image(imageLayerOptions); 36 | assertTrue(imageLayer instanceof Image); 37 | 38 | }); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/TranslateTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class TranslateTest extends GwtOLBaseTestCase { 27 | 28 | public void testTranslate() { 29 | 30 | injectUrlAndTest(() -> { 31 | 32 | TranslateOptions translateOptions = new TranslateOptions(); 33 | Translate translate = new Translate(translateOptions); 34 | 35 | assertNotNull(translate); 36 | assertTrue(translate instanceof Observable); 37 | assertTrue(translate instanceof Interaction); 38 | }); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/LayerAtPixelFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsFunction; 19 | import ol.color.Color; 20 | import ol.layer.Layer; 21 | 22 | /** 23 | * Callback for {@link PluggableMap#forEachFeatureAtPixel(Pixel, LayerAtPixelFunction, FeatureAtPixelOptions)} 24 | */ 25 | @FunctionalInterface 26 | @JsFunction 27 | public interface LayerAtPixelFunction { 28 | 29 | /** 30 | * 31 | * @param layer layer 32 | * @param color [R, G, B, A] pixel values (0 - 255), will be null for layer types that do not currently support this argument 33 | * @return To stop detection, callback functions can return a truthy value. 34 | */ 35 | boolean call(Layer layer, Color color); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/DoubleClickZoomTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class DoubleClickZoomTest extends GwtOLBaseTestCase { 27 | 28 | public void testDoubleClickZoom() { 29 | 30 | 31 | injectUrlAndTest(() -> { 32 | DoubleClickZoom doubleClickZoom = new DoubleClickZoom(); 33 | 34 | assertNotNull(doubleClickZoom); 35 | assertTrue(doubleClickZoom instanceof Observable); 36 | assertTrue(doubleClickZoom instanceof Interaction); 37 | 38 | assertNull(doubleClickZoom.getMap()); 39 | }); 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/format/WmsGetFeatureInfoTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * 22 | * A test case for {@link ol.format.WmsGetFeatureInfo}. 23 | * 24 | */ 25 | public class WmsGetFeatureInfoTest extends GwtOLBaseTestCase { 26 | 27 | public void testWmsGetFeatureInfo() { 28 | 29 | injectUrlAndTest(() -> { 30 | 31 | WmsGetFeatureInfo wmsGetFeatureInfo = new WmsGetFeatureInfo(); 32 | 33 | assertNotNull(wmsGetFeatureInfo); 34 | assertTrue(wmsGetFeatureInfo instanceof ol.format.Feature); 35 | assertTrue(wmsGetFeatureInfo instanceof ol.format.XmlFeature); 36 | 37 | }); 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/layer/TileTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * A test case for {@link ol.layer.Tile}. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class TileTest extends GwtOLBaseTestCase { 27 | 28 | @SuppressWarnings({ "static-method", "javadoc" }) 29 | public void testTileLayer() { 30 | 31 | injectUrlAndTest(() -> { 32 | 33 | TileLayerOptions tileLayerOptions = new TileLayerOptions(); 34 | assertNotNull(tileLayerOptions); 35 | Tile tile = new Tile(tileLayerOptions); 36 | assertTrue(tile instanceof Base); 37 | assertTrue(tile instanceof Tile); 38 | 39 | }); 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/Tile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsType; 19 | import ol.events.EventTarget; 20 | 21 | /** 22 | * 23 | * Base class for tiles. 24 | * 25 | */ 26 | @JsType(isNative = true) 27 | public abstract class Tile implements EventTarget { 28 | 29 | /** 30 | * Get the tile coordinate for this tile. 31 | * 32 | * @return TileCoord 33 | */ 34 | public native TileCoord getTileCoord(); 35 | 36 | /** 37 | * Load the image or retry if loading previously failed. Loading is taken 38 | * care of by the tile queue, and calling this method is only needed for 39 | * preloading or for reloading in case of an error. 40 | * 41 | */ 42 | public native void load(); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/ViewState.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | import ol.proj.Projection; 22 | 23 | /** 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class ViewState implements Options { 30 | 31 | @JsProperty 32 | public native Coordinate getCenter(); 33 | 34 | @JsProperty 35 | public native Projection getProjection(); 36 | 37 | @JsProperty 38 | public native double getResolution(); 39 | 40 | @JsProperty 41 | public native double getRotation(); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/filter/Comparison.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format.filter; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * Abstract class; normally only used for creating subclasses and not 22 | * instantiated in apps. 23 | * Base class for WFS GetFeature property comparison filters. 24 | * 25 | * @author hmgn 26 | * 27 | */ 28 | @JsType(isNative = true) 29 | public abstract class Comparison extends Filter { 30 | 31 | /** 32 | * 33 | * @param tagName The XML tag name for this filter. 34 | * @param propertyName Name of the context property to compare. 35 | */ 36 | public Comparison(String tagName, String propertyName){ 37 | super(tagName); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/DragZoomTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class DragZoomTest extends GwtOLBaseTestCase { 27 | 28 | public void testDragZoom() { 29 | 30 | injectUrlAndTest(() -> { 31 | 32 | DragZoomOptions dragZoomOptions = new DragZoomOptions(); 33 | DragZoom dragZoom = new DragZoom(dragZoomOptions); 34 | 35 | assertNotNull(dragZoom); 36 | assertTrue(dragZoom instanceof Observable); 37 | assertTrue(dragZoom instanceof Interaction); 38 | assertTrue(dragZoom instanceof Pointer); 39 | }); 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/style/FillTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.color.Color; 20 | 21 | /** 22 | * Test for {@link ol.style.Fill}. 23 | * 24 | * @author Tino Desjardins 25 | */ 26 | public class FillTest extends GwtOLBaseTestCase { 27 | 28 | public void testFill() { 29 | 30 | injectUrlAndTest(() -> { 31 | 32 | assertNotNull(new Fill()); 33 | 34 | FillOptions fillOptions = new FillOptions(); 35 | fillOptions.setColor(new Color(0, 0, 0, 1)); 36 | 37 | Fill fill = new Fill(fillOptions); 38 | assertNotNull(fill); 39 | assertNotNull(fill.getColor()); 40 | 41 | }); 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/control/ScaleLine.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2016 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.control; 17 | 18 | import jsinterop.annotations.JsType; 19 | 20 | /** 21 | * A control displaying rough x-axis distances, calculated for the center of the 22 | * viewport. No scale line will be shown when the x-axis distance cannot be 23 | * calculated in the view projection (e.g. at or beyond the poles in EPSG:4326). 24 | * By default the scale line will show in the bottom left portion of the map, 25 | * but this can be changed by using the css selector `.ol-scale-line`. 26 | * 27 | * @author Tino Desjardins 28 | * 29 | */ 30 | @JsType(isNative = true) 31 | public class ScaleLine extends Control { 32 | 33 | public ScaleLine() {} 34 | 35 | public ScaleLine(ScaleLineOptions scaleLineOptions) {} 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/layer/VectorTileTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2021 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.layer; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * A test case for {@link ol.layer.VectorTile}. 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class VectorTileTest extends GwtOLBaseTestCase { 27 | 28 | public void testVectorTileLayer() { 29 | 30 | injectUrlAndTest(() -> { 31 | 32 | VectorTileLayerOptions vectorLayerOptions = new VectorTileLayerOptions(); 33 | assertNotNull(vectorLayerOptions); 34 | 35 | VectorTile vectorLayer = new VectorTile(vectorLayerOptions); 36 | assertTrue(vectorLayer instanceof Base); 37 | assertTrue(vectorLayer instanceof BaseVector); 38 | 39 | }); 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/proj/ProjectionOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.proj; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | 21 | import ol.Options; 22 | import ol.Extent; 23 | import jsinterop.annotations.JsType; 24 | 25 | /** 26 | * @author Tino Desjardins 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class ProjectionOptions implements Options { 30 | 31 | @JsProperty 32 | public native void setCode(String code); 33 | 34 | @JsProperty 35 | public native void setUnits(String units); 36 | 37 | @JsProperty 38 | public native void setGlobal(boolean global); 39 | 40 | @JsProperty 41 | public native void setExtent(Extent extent); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/source/TileWms.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2020 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | /** 17 | * 18 | * @author mribeiro 19 | * 20 | */ 21 | package ol.source; 22 | 23 | import jsinterop.annotations.JsType; 24 | import ol.Coordinate; 25 | import ol.proj.Projection; 26 | 27 | /** 28 | * 29 | */ 30 | @JsType(isNative = true, name = "TileWMS") 31 | public class TileWms extends TileImage { 32 | 33 | /** 34 | * Constructs a(n) {@link TileWms} object. 35 | * 36 | */ 37 | public TileWms(TileWmsOptions options) {} 38 | 39 | public native String getFeatureInfoUrl(Coordinate coordinate, double resolution, Projection projection, 40 | WmsFeatureInfoParams params); 41 | 42 | public native TileWmsParams getParams(); 43 | 44 | public native void updateParams(TileWmsParams params); 45 | 46 | } -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/source/ImageStaticTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.source; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | 20 | /** 21 | * A test case for {@link ol.source.ImageStatic}. 22 | * 23 | * @author Tino desjardins 24 | */ 25 | public class ImageStaticTest extends GwtOLBaseTestCase { 26 | 27 | public void testImageStatic() { 28 | 29 | injectUrlAndTest(() -> { 30 | 31 | ImageStaticOptions imageStaticOptions = new ImageStaticOptions(); 32 | imageStaticOptions.setUrl("http://imgs.xkcd.com/comics/online_communities.png"); 33 | ImageStatic imageStatic = new ImageStatic(imageStaticOptions); 34 | 35 | assertNotNull(imageStatic); 36 | assertTrue(imageStatic instanceof Source); 37 | }); 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/interaction/DragRotateAndZoomTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2018 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.interaction; 17 | 18 | import ol.GwtOLBaseTestCase; 19 | import ol.Observable; 20 | 21 | /** 22 | * 23 | * @author Tino Desjardins 24 | * 25 | */ 26 | public class DragRotateAndZoomTest extends GwtOLBaseTestCase { 27 | 28 | public void testDragRotateAndZoom() { 29 | 30 | 31 | injectUrlAndTest(() -> { 32 | DragRotateAndZoom dragRotateAndZoom = new DragRotateAndZoom(); 33 | 34 | assertNotNull(dragRotateAndZoom); 35 | assertTrue(dragRotateAndZoom instanceof Observable); 36 | assertTrue(dragRotateAndZoom instanceof Interaction); 37 | assertTrue(dragRotateAndZoom instanceof Pointer); 38 | }); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/format/OsmXmlFeatureOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.format; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsType; 20 | import jsinterop.annotations.JsProperty; 21 | import ol.Options; 22 | import ol.proj.Projection; 23 | 24 | /** 25 | * Options for the OSM-XML. 26 | * 27 | * @author mazlixek 28 | */ 29 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 30 | public class OsmXmlFeatureOptions implements Options { 31 | 32 | /** 33 | * @param projection 34 | */ 35 | @JsProperty 36 | public native void setDataProjection(Projection projection); 37 | 38 | /** 39 | * @param projection 40 | */ 41 | @JsProperty 42 | public native void setFeatureProjection(Projection projection); 43 | } 44 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/style/CircleOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2019 gwt-ol 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol.style; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | 22 | /** 23 | * Options for the circle style. 24 | * 25 | * @author Tino Desjardins 26 | * 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class CircleOptions extends RegularShapeOptions { 30 | 31 | /** 32 | * Fill style. 33 | * 34 | * @param fill {@link Fill} 35 | */ 36 | @JsProperty 37 | public native void setFill(Fill fill); 38 | 39 | /** 40 | * Stroke style. 41 | * 42 | * @param stroke {@link Stroke} 43 | */ 44 | @JsProperty 45 | public native void setStroke(Stroke stroke); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/main/java/ol/FeatureOptions.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | import jsinterop.annotations.JsPackage; 19 | import jsinterop.annotations.JsProperty; 20 | import jsinterop.annotations.JsType; 21 | import ol.geom.Geometry; 22 | 23 | /** 24 | * {@link Feature} options. 25 | * 26 | * @author sbaumhekel 27 | */ 28 | @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") 29 | public class FeatureOptions implements Options { 30 | 31 | /** 32 | * The default geometry for the feature. 33 | * 34 | * @param geom {@link Geometry} 35 | */ 36 | @JsProperty 37 | public native void setGeometry(Geometry geom); 38 | 39 | /** 40 | * Id. 41 | * 42 | * @param id 43 | */ 44 | @JsProperty 45 | public native void setId(String id); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /gwt-ol3-client/src/test/java/ol/PixelTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014, 2017 gwt-ol3 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package ol; 17 | 18 | /** 19 | * Test for {@link ol.Pixel}. 20 | * 21 | * @author Tino Desjardins 22 | * 23 | */ 24 | public class PixelTest extends GwtOLBaseTestCase { 25 | 26 | public void testPixel() { 27 | 28 | injectUrlAndTest(() -> { 29 | 30 | Pixel pixel = new Pixel(100, 50); 31 | assertNotNull(pixel); 32 | assertEquals(100, pixel.getX()); 33 | assertEquals(50, pixel.getY()); 34 | 35 | Pixel clonedPixel = pixel.cloneObject(); 36 | assertNotNull(clonedPixel); 37 | assertEquals(pixel.getX(), clonedPixel.getX()); 38 | assertEquals(pixel.getY(), clonedPixel.getY()); 39 | 40 | }); 41 | 42 | } 43 | 44 | } 45 | --------------------------------------------------------------------------------