[Geoserver-devel] [jira] (GEOS-6215) workspace styles can only use images/graphics from global workspace

Richard Duivenvoorde created BugGEOS-6215
workspace styles can only use images/graphics from global workspace

Issue Type:

BugBug

Affects Versions:

2.4.2

Assignee:

Andrea Aime

Components:

CSS

Created:

05/Dec/13 6:31 AM

Description:

Trying to style a workspace point layer using css workspace style with an example from:

http://docs.geoserver.org/latest/en/user/extensions/css/cookbook_point.html#point-as-graphic

The global data styles dir is in:

file:/d:/data/geoserver2.4.x/data_dir/styles/

While the created namespace styles are in:

d:\data\geoserver2.4.x\data_dir\workspaces\myworkspace\styles

Trying to use this:

  • { mark: url(smileyface.png); mark-mime: “image/png”; }

I see that the url in the sldf wants the image now in:

file:/d:/data/geoserver2.4.x/data_dir/styles/smileyface.png

While I think, usign an image in a workspace style should also look for its images in the workspace/style folder:

file:/d:/data/geoserver2.4.x/data_dir/workspaces/myworkspace/styles/smileyface.png

As a workaround I thought to use the full path in the css:

  • { mark: url(file:d:\data\geoserver2.4.x\data_dir\workspaces\myworkpace\styles\smileyface.png); mark-mime: “image/png”; }

But then the sld path becomes:

<sld:OnlineResource xmlns:xlink=“http://www.w3.org/1999/xlink” xlink:type=“simple” xlink:href=“file:/d:/data/geoserver2.4.x/data_dir/styles/d:/data/geoserver2.4.x/data_dir/workspaces/myworkspace/styles/smileyface.png”/>

Which is also wrong I think.

Last idea:

  • { mark: url(file:d:....\workspaces\myworkspace\styles\smileyface.png); mark-mime: “image/png”; }

Ah that one is working

But I think this is a workaround? It would be nicer if defining a file name as mark:url the searchpath would be in the workspace/style directory (in case of a style from a workspace)

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Richard Duivenvoorde

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)