0

I have set up a GeoServer instance that hosts a lot of data that we process at work. It seems to be the easiest way to distribute since I can provide a simple network link to the GeoServer so that others can view it in Google Earth. In this case, I have a bunch of points that I have created a style for. The style is a PNG for each type. Here is an excerpt from my SLD:

<PointSymbolizer>
    <Graphic>
        <ExternalGraphic>
          <OnlineResource xlink:type="simple" xlink:href="towerBlue.png" />
          <Format>image/png</Format>
        </ExternalGraphic>
        <Size>10</Size>
    </Graphic>
</PointSymbolizer>

The sizes of these seem to be all out of whack. When zoomed out, they are tiny, but when I zoom in literally 2 wheel clicks from where the first screenshot comes from, they cover the whole screen. What could I be doing wrong here? Also, SVG didn't work for me at all, which is why I'm using PNG.

Symbols very small

GIANT SYMBOLS!!

  • Syntax seems to be correct according to docs.geoserver.org/latest/en/user/styling/sld-cookbook/…. Does your symbol keep the 10 pixel width if you look your layer with the GeoServer Layer preview utility? Thinking if it could only effect KML output. – user30184 Dec 5 '14 at 14:18
  • @user30184, I just went back and checked this. Using the open layers preview, the icons do stay at 10 pixel width... Any way to force KML output to not scale, or whatever it is that it's trying to do? – jpmaniac87 Dec 5 '14 at 16:29
0

In my case the solution was replacing de format of the image.

Doing this:

Replace

<Format>image/png</Format

with

<Format>application/vnd.google-earth.kml+XML</Format>

<PointSymbolizer>
   <Graphic>
      <ExternalGraphic>
         <OnlineResource xlink:type="simple" xlink:href="http://geoserver.112ib.com/styles/SEIB112/imagenes/olimpic.png"/>
         <Format>application/vnd.google-earth.kml+XML</Format>
      </ExternalGraphic>
   </Graphic>
</PointSymbolizer>

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.