1

In my Geoserver set up, I have a style that references a custom icon in my data_dir.

Is it possible to add CSS values to alter the image, rather than changing the image itself and uploading a new copy to data_dir to reference? Such as adding an outline or doing more than just adjusting the size.

[group = 'group1'] {
  /* @title Group1 */ 
  [coordinate_type = 'exact']{
  mark: url(group1.png);
  mark-mime: "image/png";
  mark-size: 24px;
 };
  • Not with png but it should be possible with the right svgs – Ian Turton Oct 16 '17 at 17:55
1

Yes, it is possible. Geoserver provides an example in it's documentation Fills with randomized symbols

enter image description here

  • I see that working for "fill" but in my case specifically, I need to use "mark" in order to bring in an image to use as an icon. Right now they don't have any effect. Is there a way to bring in an image using "fill?" – Taylor F Oct 16 '17 at 18:05
1

In CSS you can set outline and color of marks, which are vector shapes that can be filled and stroked. Check which marks you can use with SLD and then use the same for CSS. Example here:

http://docs.geoserver.org/latest/en/user/styling/css/cookbook/point.html#transparent-triangle

However you cannot do the same with a PNG, that's a fixed set of pixels with their own color, there is no outline or fill to be recognized and altered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.