Skip to content

Commit

Permalink
[AH-289] wfs custom style support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikko Johansson committed Nov 12, 2013
1 parent c3d8f02 commit 9a37d9b
Show file tree
Hide file tree
Showing 19 changed files with 2,394 additions and 59 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*/target
*/*/target
*/.settings
*/.classpath
*/.project
Expand All @@ -8,3 +9,4 @@
.project
/data/
/servlet-map/src/main/webapp/WEB-INF/jetty-env.xml
transport.log
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ UPDATE portti_view_bundle_seq set startup = '{
},
"mapfull" : {
"bundlePath" : "/Oskari/packages/framework/bundle/"
},
"ui-components" : {
"bundlePath" : "/Oskari/packages/framework/bundle/"
}
},
"Require-Bundle-Instance" : []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Shape getShape(Graphics2D graphics, Expression symbolUrl, Feature feature
String[] fontElements = markUrl.substring(9).split("#");

// look up the font
Font font = FontCache.getDefaultInsance().getFont(fontElements[0]);
Font font = Font.createFont(Font.TRUETYPE_FONT, this.getClass().getResourceAsStream("/dot-markers.ttf"));

if (font == null) {
throw new IllegalArgumentException("Unknown font " + fontElements[0]);
Expand Down
2 changes: 2 additions & 0 deletions service-OGC/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
<artifactId>flexjson</artifactId>
<version>2.0</version>
</dependency>
<!--
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>xsd</artifactId>
<version>2.3.0-v200706262000</version>
</dependency>
-->

<dependency>
<groupId>org.geotools</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,12 @@ private static void populateLayerStylesOnJSONArray(JSONObject styleJSON, Layer l
List<WFSSLDStyle> styleList = wfsService.findWFSLayerStyles(layer.getId());
try{
if ( styleList.size() > 0) {
JSONArray arr = new JSONArray();
for (WFSSLDStyle style : styleList) {
JSONObject obj = createStylesJSON(style.getName(), style.getName(), style.getName());
styleJSON.accumulate("styles", obj);
JSONObject obj = createStylesJSON(style.getName(), style.getName(), style.getName());;
arr.put(obj);
}
styleJSON.put("styles", arr);
}
}catch (Exception e) {
throw new RuntimeException(e);
Expand Down
22 changes: 22 additions & 0 deletions transport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,28 @@
<artifactId>oskari-base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fi.nls.oskari</groupId>
<artifactId>shared-test-resources</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>OskariMarkFactory</artifactId>
<version>1.0</version>
<!--
<exclusions>
<exclusion>
<groupId>org.geoserver</groupId>
<artifactId>main</artifactId>
</exclusion>
<exclusion>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile-renderer</artifactId>
</exclusion>
</exclusions>
-->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public void setKeepPrevious(boolean keepPrevious) {
* otherwise.
*/
public boolean save() {
JedisManager.setex(KEY + client, 86400, getAsJSON());
JedisManager.setex(KEY + client, 86400, getAsJSON());
return this.isValid();
}

Expand Down
Loading

0 comments on commit 9a37d9b

Please sign in to comment.