Skip to content

Commit 9f0d5cf

Browse files
author
Tino Desjardins
committed
Add preliminary support for openlayers 10.6.1
1 parent 110b334 commit 9f0d5cf

File tree

10 files changed

+18
-225
lines changed

10 files changed

+18
-225
lines changed

gwt-ol3-client/src/main/java/ol/OLFactory.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@
8181
import ol.source.Osm;
8282
import ol.source.RasterOptions;
8383
import ol.source.Source;
84-
import ol.source.Stamen;
85-
import ol.source.StamenOptions;
8684
import ol.source.TileDebug;
8785
import ol.source.TileDebugOptions;
8886
import ol.source.TileWms;
@@ -939,10 +937,6 @@ public static TileCoord createTileCoord(double x, double y, double z) {
939937

940938
/** Common **/
941939

942-
public static Stamen createStamenSource(StamenOptions stamenOptions) {
943-
return new Stamen(stamenOptions);
944-
};
945-
946940
/**
947941
* Creates a new {@link Stroke} style.
948942
*

gwt-ol3-client/src/main/java/ol/source/Stamen.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

gwt-ol3-client/src/main/java/ol/source/StamenOptions.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

gwt-ol3-client/src/main/java/ol/style/RegularShapeOptions.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2014, 2019 gwt-ol
2+
* Copyright 2014, 2025 gwt-ol
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,14 +75,6 @@ public class RegularShapeOptions implements Options {
7575
@JsProperty
7676
public native void setRotation(double rotation);
7777

78-
/**
79-
* Inner radius of a star.
80-
*
81-
* @param radius1 radius
82-
*/
83-
@JsProperty
84-
public native void setRadius1(double radius1);
85-
8678
/**
8779
* Outer radius of a star.
8880
*

gwt-ol3-client/src/test/java/ol/GwtOLBaseTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public abstract class GwtOLBaseTestCase extends BaseTestCase {
2929
public GwtOLBaseTestCase() {
3030

3131
super(Arrays.asList(
32-
"//cdn.jsdelivr.net/npm/ol@7.5.2/dist/ol.min.js"),
32+
"//cdn.jsdelivr.net/npm/ol@10.6.1/dist/ol.min.js"),
3333
"ol.GwtOLTest",
3434
10000);
3535
}

gwt-ol3-client/src/test/java/ol/style/RegularShapeTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2014, 2019 gwt-ol
2+
* Copyright 2014, 2025 gwt-ol
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,16 +30,16 @@ public void testRegularShape() {
3030
injectUrlAndTest(() -> {
3131
RegularShapeOptions regularShapeOptions = new RegularShapeOptions();
3232
regularShapeOptions.setAngle(Math.PI / 4);
33-
regularShapeOptions.setRadius1(4);
33+
regularShapeOptions.setRadius(4);
3434
regularShapeOptions.setRadius2(3);
3535
regularShapeOptions.setRotation(Math.PI / 3);
3636
regularShapeOptions.setRotateWithView(false);
3737
assertNotNull(regularShapeOptions);
3838

3939
RegularShape regularShape = new RegularShape(regularShapeOptions);
4040
assertNotNull(regularShape);
41-
assertEquals(regularShape.getRadius(), 4d);
42-
assertEquals(regularShape.getRadius2(), 3d);
41+
assertEquals(4d, regularShape.getRadius());
42+
assertEquals(3d, regularShape.getRadius2());
4343

4444
regularShape.setOpacity(0.5);
4545
regularShape.setRotation(Math.PI);

gwt-ol3-demo/src/main/java/com/github/tdesjardins/ol3/demo/client/example/HeatmapExample.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2014, 2021 gwt-ol
2+
* Copyright 2014, 2025 gwt-ol
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,9 +17,9 @@
1717

1818
import ol.Coordinate;
1919
import ol.Feature;
20-
import ol.source.Stamen;
21-
import ol.source.StamenOptions;
20+
import ol.source.Osm;
2221
import ol.source.VectorOptions;
22+
import ol.source.XyzOptions;
2323
import ol.Map;
2424
import ol.MapOptions;
2525
import ol.OLFactory;
@@ -46,13 +46,14 @@ public class HeatmapExample implements Example {
4646
@Override
4747
public void show(String exampleId) {
4848

49-
StamenOptions stamenOptions = new StamenOptions();
50-
stamenOptions.setLayer("toner");
49+
// create a OSM-layer
50+
XyzOptions osmSourceOptions = OLFactory.createOptions();
5151

52-
Stamen stamen = new Stamen(stamenOptions);
52+
Osm osmSource = new Osm(osmSourceOptions);
53+
LayerOptions osmLayerOptions = OLFactory.createOptions();
54+
osmLayerOptions.setSource(osmSource);
5355

54-
LayerOptions rasterLayerOptions = OLFactory.createOptions();
55-
rasterLayerOptions.setSource(stamen);
56+
Tile osmLayer = new Tile(osmLayerOptions);
5657

5758
VectorOptions vectorOptions = new VectorOptions();
5859
vectorOptions.setUrl("https://openlayers.org/en/latest/examples/data/kml/2012_Earthquakes_Mag5.kml");
@@ -63,8 +64,6 @@ public void show(String exampleId) {
6364

6465
ol.source.Vector vectorSource = new ol.source.Vector(vectorOptions);
6566

66-
Tile stamenLayer = new Tile(rasterLayerOptions);
67-
6867
HeatmapOptions heatmapOptions = new HeatmapOptions();
6968
heatmapOptions.setSource(vectorSource);
7069
heatmapOptions.setBlur(15);
@@ -102,7 +101,7 @@ public void show(String exampleId) {
102101
MousePosition mousePosition = new MousePosition();
103102
mousePosition.setCoordinateFormat(Coordinate.createStringXY(2));
104103
map.addControl(mousePosition);
105-
map.addLayer(stamenLayer);
104+
map.addLayer(osmLayer);
106105
map.addLayer(heatmapLayer);
107106

108107
}

gwt-ol3-demo/src/main/java/com/github/tdesjardins/ol3/demo/client/example/OLExampleType.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public enum OLExampleType {
4545
OverlayExample(new OverlayExample()),
4646
RasterExample(new RasterExample()),
4747
SelectFeaturesExample(new SelectFeaturesExample()),
48-
TileExample(new TileExample()),
4948
TileWmsExample(new TileWmsExample()),
5049
WfsExample(new WfsExample()),
5150
WmsExample(new WmsExample()),

gwt-ol3-demo/src/main/java/com/github/tdesjardins/ol3/demo/client/example/TileExample.java

Lines changed: 0 additions & 115 deletions
This file was deleted.

gwt-ol3-demo/src/main/resources/com/github/tdesjardins/ol3/demo/public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head>
44
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
55
<link href="style.css" rel="stylesheet" type="text/css">
6-
<link href="//cdn.jsdelivr.net/npm/ol@7.5.2/ol.min.css" rel="stylesheet" type="text/css">
7-
<script src="//cdn.jsdelivr.net/npm/ol@7.5.2/dist/ol.min.js" type="text/javascript"></script>
6+
<link href="//cdn.jsdelivr.net/npm/ol@10.6.1/ol.min.css" rel="stylesheet" type="text/css">
7+
<script src="//cdn.jsdelivr.net/npm/ol@10.6.1/dist/ol.min.js" type="text/javascript"></script>
88
<script src="demo.nocache.js" type="text/javascript"></script>
99

1010
<title>GWT-OL Playground</title>

0 commit comments

Comments
 (0)