forked from wicketstuff/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an ArcGIS tile source and added an opacity property to Layer.
- Loading branch information
Showing
4 changed files
with
101 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...-examples/src/main/java/org/wicketstuff/openlayers3/examples/WicketApplication.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LayerOption.STREET=Street | ||
LayerOption.SATELLITE=Satellite | ||
LayerOption.OPEN_SPACE=Open Space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...openlayers3/src/main/java/org/wicketstuff/openlayers3/api/source/tile/TileArcGISRest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.wicketstuff.openlayers3.api.source.tile; | ||
|
||
import java.io.Serializable; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.google.common.base.Joiner; | ||
|
||
/** | ||
* Provides an object that models an ESRI ArcGIS tile end-point. | ||
* <p/> | ||
* Example: <code>new TileArcGISRest().setUrl("http://www.orthos.dhses.ny.gov/arcgis/rest/services/Latest/MapServer")</code> | ||
* <p/> | ||
* @see <a href="http://openlayers.org/en/latest/apidoc/ol.source.TileArcGISRest.html">http://openlayers.org/en/latest/apidoc/ol.source.TileArcGISRest.html</a> | ||
*/ | ||
public class TileArcGISRest extends TileSource implements Serializable { | ||
|
||
private String url; | ||
|
||
@Override | ||
public String getJsType() { | ||
return "ol.source.TileArcGISRest"; | ||
} | ||
|
||
@Override | ||
public String renderJs() { | ||
List<String> list = new ArrayList<>(); | ||
list.add("'url': '" + getUrl() + "'"); | ||
return "{" + Joiner.on(", ").join(list) + "}"; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public TileArcGISRest setUrl(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
} |