GeoServer
  1. GeoServer
  2. GEOS-4074

Errors when multiple LEGEND_OPTIONS parameters are supplied

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.x
    • Fix Version/s: None
    • Component/s: WMS
    • Labels:
      None
    • Environment:
      Linux ubuntu 32bit & WindowsXP
    • Number of attachments :
      1

      Description

      If we suply more then one value (comma separated) for LEGEND_OPTION parameter, strange things happen.

      It depends on the order of the values. As i need foreLabels and fontSize options, I tested these requests:

      http://localhost:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=200&HEIGHT=200&LAYER=topp:states&legend_options=forceLabels:off,fontSize:40
      ==
      No error is thrown, but forceLabels:off isnt applied

      http://localhost:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=200&HEIGHT=200&LAYER=topp:states&legend_options=fontSize:40,forceLabels:ff
      ==
      Results: (log in attachment)
      <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" > <ServiceException>
      java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
      java.util.ArrayList cannot be cast to java.lang.String
      </ServiceException></ServiceExceptionReport>

        Activity

        Hide
        Ivan Grcic added a comment -

        Issue should be called

        Erros when multiple values are supplied for LEGEND_OPTION parameter

        So if somene can rename it, tnx

        Show
        Ivan Grcic added a comment - Issue should be called Erros when multiple values are supplied for LEGEND_OPTION parameter So if somene can rename it, tnx
        Hide
        Andrea Aime added a comment -
        Show
        Andrea Aime added a comment - The legend options separator is a semicolumn, not a comma: http://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/legendgraphic.html
        Hide
        Ivan Grcic added a comment - - edited

        Ah I was looking into some older docs, where it said its comma separated. Its working just fine with semicolon.

        Sorry for the noise.

        Show
        Ivan Grcic added a comment - - edited Ah I was looking into some older docs, where it said its comma separated. Its working just fine with semicolon. Sorry for the noise.
        Hide
        Andrea Aime added a comment -

        Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

        Show
        Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

          People

          • Assignee:
            Andrea Aime
            Reporter:
            Ivan Grcic
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: