]>
git.argeo.org Git - gpl/argeo-suite.git/blob - org.argeo.app.geo/src/org/argeo/app/ol/Layer.java
1 package org
.argeo
.app
.ol
;
3 import java
.util
.Objects
;
5 public class Layer
extends AbstractOlObject
{
6 public final static String NAME_KEY
= "name";
11 public Layer(Object
... args
) {
15 public void setOpacity(double opacity
) {
16 if (opacity
< 0 || opacity
> 1)
17 throw new IllegalArgumentException("Opacity must be between 0 and 1");
19 // getNewOptions().put("opacity", opacity);
21 // executeMethod(getMethodName(), opacity);
22 doSetValue(getMethodName(), "opacity", opacity
);
25 public void setSource(Source source
) {
26 Objects
.requireNonNull(source
);
28 getNewOptions().put("source", source
);
30 executeMethod(getMethodName(), source
);
33 public Source
getSource() {
34 String reference
= getReference() + ".getSource()";
35 return new Source(getJsClient(), reference
);
38 public void setMinResolution(double minResolution
) {
40 getNewOptions().put("minResolution", minResolution
);
42 executeMethod(getMethodName(), minResolution
);
45 public void setMaxResolution(double maxResolution
) {
47 getNewOptions().put("maxResolution", maxResolution
);
49 executeMethod(getMethodName(), maxResolution
);
52 public void setName(String name
) {
57 public String
getName() {