1

I have a set of PNG images I want to use as symbols in a point type layer in Mapserver. The file names come from the database in the DATA keyword, and if a file exists, it's all right. But if it does not exist, I'd like to use some default symbol. Something like this:

CLASS
    EXPRESSION ([symb_name] exists)
    STYLE
        SYMBOL [symb_name]
    END
END
CLASS
    STYLE
        SYMBOL 'default.png'
    END
END

Is there any way to accomplish this?

  • 1
    I fear that it is not supported. Consider making a feature request. As a workaround I would update the database and update the [symb_name] to really have 'default.png' as a default value. Alternatively, edit DATA to use CASE: IF symb_name is not null THEN use that, ELSE use symb_name='default.png'. – user30184 May 1 '16 at 21:31

Your Answer

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

Browse other questions tagged or ask your own question.