Hi David, sorry for the late reply. Thanks a lot for the quick fix! I will definitely have a look at the sources myself someday if I find the time.. For now I can achieve most of the desired styling with the CSS module. Thanks for your good work.
Cheers, Matthias Am 07.12.2012 15:49, schrieb David Winslow: > You're right, the docs are incorrect wrt the MIME information. I'll go > ahead and update them so they will be correct after the next automated > rebuild. > > I am indeed the only developer on the CSS module. It's not under > frequent development but I do try to keep up with bugs reported on this > mailing list (and the github issue list.) Actually I resolved the > dynamic color bug last night. I haven't updated the plugin in the > community build yet (maybe this weekend) but if you want an early peak > you can just grab the JAR file from > http://gridlock.opengeo.org:8080/hudson/view/geoscript/job/geoscript-scala/ws/geocss/target/scala-2.9.1/ > and overwrite the one that you already installed. > > -- > David Winslow > OpenGeo - http://opengeo.org/ > > > On Fri, Dec 7, 2012 at 6:12 AM, Matthias Uden <matthias.u...@gmail.com > <mailto:matthias.u...@gmail.com>> wrote: > > David, > > thanks a lot for the quick answer and clarification! > I didn't know about the CSS property "mark-mime", since it is not part > of the CSS Property Listing > (http://docs.geoserver.org/stable/en/user/community/css/properties.html). > This > at least fixed the Icon Media Type issue. > It's a pity that dynamic colors are not yet supported. I suppose that > the CSS Module is currently not actively developed anymore due to lack > of time. Are you the only developer? > > Cheers, > Matthias > > > > Am 06.12.2012 16:14, schrieb David Winslow: > > *Relative Paths for Icons > > *The short answer is, no, you can't make it do that. The problem is > > that the CSS-SLD converter actually uses GeoTools' SLD writing > code to > > generate the SLD files, and GeoTools' SLD support is not symmetric (I > > mean it cannot write everything that it can read.) Resolving > relative > > paths into absolute ones is a compromise between the actually desired > > behavior and not supporting relative paths at all. This could > probably > > be fixed at the GeoTools level, but I haven't taken the time to > inquire > > into why this asymmetry was built in in the first place. > > > > Why are relative paths a problem for you? Maybe there is a workaround > > that could be used (for example, if it's a problem with > relocating data > > directories, I could add a tool to re-convert all CSS styles > which would > > re-resolve the paths.) > > * > > Icon Media Types* > > The image type logic is not as sophisticated as you might expect - > > things like dynamic symbolizers[1] make it impossible to know the > media > > type for the image in general, so I just threw my hands up and > made it > > literally 'image/jpeg' if you don't specify. You can provide the > media > > type explicitly with the *fill-mime*, *stroke-mime*, *mark-mime*, or > > *shield-mime* property. For example: > > > > * { > > fill: url(pattern.png); > > fill-mime: "image/png"; > > } > > > > I don't guess it would be too hard to make the CSS-SLD converter > try to > > look up the icon and inspect it to provide the default, but this > is not > > as big a priority to me as rendering transformations. If you want to > > look into it let me know and I can give you some pointers on > what's needed. > > > > *Dynamic Color* > > This is simply a bug (the color handling is a bit more complex > than the > > label handling, to allow for rgb() color syntax.) Again, this is > > probably easily fixable given the time to work on it; I'd say even > > easier than smart defaults for the icon mime-type property. > > > > If you'd like to file bugs against GeoScript-Scala[2] I'll keep them > > up-to-date if and when I get around to working on these problems. > > > > > > [1]: http://blog.geoserver.org/2008/12/08/dynamic-symbolizers-part-1/ > > [2]: https://github.com/dwins/geoscript.scala/issues > > > > > > On Thu, Dec 6, 2012 at 7:53 AM, Matthias Uden > <matthias.u...@gmail.com <mailto:matthias.u...@gmail.com> > > <mailto:matthias.u...@gmail.com > <mailto:matthias.u...@gmail.com>>> wrote: > > > > Hi all, > > > > I've recently discovered the CSS module as an alternative to > SLD styling > > and I'm quite enthusiastic about it. Still, I cannot accomplish > > everything I used to do with SLD before... > > > > Here are two specific questions: > > > > 1) When specifying a custom icon for a mark with url(...), is it > > possible to get a relative path in the generated SLD instead > of an > > absolute one? Also, is there a possibility to specify the > format of that > > image correctly? Currently, it is always converted to jpeg, > even when I > > put in a png... > > > > Example: > > CSS: > > mark: url('icons/entry.png'); > > > > SLD: > > <sld:ExternalGraphic> > > <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" > > xlink:type="simple" > > > > xlink:href="file:/home/muden/test_geoserver/wms/map/geoserver/test_geoserver/styles/icons/entry.png"/> > > <sld:Format>image/jpeg</sld:Format> > > </sld:ExternalGraphic> > > > > > > > > > > 2) Specifying an attributes value dynamically using a column > of the > > underlying DB table works fine for e.g. labels. However, it > doesn't work > > for colors. > > > > Example (working): > > CSS: > > label: [key]; > > > > SLD: > > <sld:Label> > > <ogc:PropertyName>key</ogc:PropertyName> > > </sld:Label> > > > > Example (not working): > > CSS: > > fill: [color]; > > > > SLD: > > <sld:Fill/> > > > > > > Any help is appreciated! > > Thanks in advance and all the best, > > Matthias > > > > > > > > > > > > ------------------------------------------------------------------------------ > > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free > Trial > > Remotely access PCs and mobile devices and provide instant > support > > Improve your efficiency, and focus on delivering more > value-add services > > Discover what IT Professionals Know. Rescue delivers > > http://p.sf.net/sfu/logmein_12329d2d > > _______________________________________________ > > Geoserver-users mailing list > > Geoserver-users@lists.sourceforge.net > <mailto:Geoserver-users@lists.sourceforge.net> > > <mailto:Geoserver-users@lists.sourceforge.net > <mailto:Geoserver-users@lists.sourceforge.net>> > > https://lists.sourceforge.net/lists/listinfo/geoserver-users > > > > > > > > > > > > ------------------------------------------------------------------------------ > > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > > Remotely access PCs and mobile devices and provide instant support > > Improve your efficiency, and focus on delivering more value-add > services > > Discover what IT Professionals Know. Rescue delivers > > http://p.sf.net/sfu/logmein_12329d2d > > > > > > > > _______________________________________________ > > Geoserver-users mailing list > > Geoserver-users@lists.sourceforge.net > <mailto:Geoserver-users@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/geoserver-users > > > > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Geoserver-users mailing list > Geoserver-users@lists.sourceforge.net > <mailto:Geoserver-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/geoserver-users > > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > > > > _______________________________________________ > Geoserver-users mailing list > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users