0

I have a layer that is comprised of a number of different polygons and want to symbolize dynamically using the database. I have achieved this but the issue is in styling the image in the polygon is not fitting it is repeating when I zoom in. I want to fit the image fit in the polygon when I zoom in or out.

2
  • Here is the SLD that i am using now <Rule> <PolygonSymbolizer> <Fill> <GraphicFill> <Graphic> <ExternalGraphic> <OnlineResource xlink:type="simple" xlink:href="map-logos/${image_url}.png" /> <Format>image/png</Format> </ExternalGraphic> <Size>Auto</Size> </Graphic> </GraphicFill> </Fill> </PolygonSymbolizer> </Rule>
    – Saad Zahid
    Commented Dec 29, 2022 at 19:38
  • 2
    Please do not comment on your own Question. Instead, Edit the question and delete the comment
    – Vince
    Commented Dec 29, 2022 at 20:43

1 Answer 1

2

There is no such thing as complete auto-scaling... what you could do may be to set the image size in ground units, so that when you zoom in, the size of the image also increases. That said, with a PNG the results of upscaling would look pretty bad (pixellated or blurry). A SVG image might give you better results.

Generally speaking, when using image fills, it's a good idea to make sure the images are seamless background images (that is, images that can be replicated on each side and will not show any interruption).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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