Skip to content

Commit e30506d

Browse files
committed
Merge branch 'main' into v.next
2 parents f3a268e + 2348d63 commit e30506d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
-164 KB
Loading

ogc/style-wms-layer/src/main/java/com/esri/samples/style_wms_layer/StyleWmsLayerSample.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public void start(Stage stage) {
6464

6565
// create style toggle button, disable until layer is loaded
6666
ToggleButton styleToggleButton = new ToggleButton();
67-
styleToggleButton.setText("Toggle style");
67+
styleToggleButton.setText("Default");
6868
styleToggleButton.setDisable(true);
6969

7070
// create a WMS layer
71-
List<String> wmsLayerNames = Collections.singletonList("fsa2017");
72-
String url = "http://geoint.lmic.state.mn.us/cgi-bin/wms?VERSION=1.3.0&SERVICE=WMS&REQUEST=GetCapabilities";
71+
List<String> wmsLayerNames = Collections.singletonList("mncomp");
72+
String url = "https://imageserver.gisdata.mn.gov/cgi-bin/mncomp?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities";
7373
wmsLayer = new WmsLayer(url, wmsLayerNames);
7474
wmsLayer.addDoneLoadingListener(() -> {
7575
if (wmsLayer.getLoadStatus() == LoadStatus.LOADED) {
@@ -85,9 +85,12 @@ public void start(Stage stage) {
8585
// set the style when the button is toggled
8686
styleToggleButton.selectedProperty().addListener((observable, oldValue, newValue) -> {
8787
if (styleToggleButton.isSelected()) {
88+
// contrast Stretch - 2 Std. Deviations contrast stretch
89+
styleToggleButton.setText("Contrast Stretch");
8890
wmsLayer.getSublayers().get(0).setCurrentStyle(styles.get(1));
8991
} else {
90-
// default style
92+
// default - color as it appears in aerial imagery
93+
styleToggleButton.setText("Default");
9194
wmsLayer.getSublayers().get(0).setCurrentStyle(styles.get(0));
9295
}
9396
});

0 commit comments

Comments
 (0)