Package org.vfny.geoserver.global

Examples of org.vfny.geoserver.global.LegendURL


         *
         * @task TODO: figure out how to unhack legend parameters such as
         *       WIDTH, HEIGHT and FORMAT
         */
        protected void handleLegendURL(FeatureTypeInfo ft) {
            LegendURL legend = ft.getLegendURL();

            if (legend != null) {
                LOGGER.config("using user supplied legend URL");

                AttributesImpl attrs = new AttributesImpl();
                attrs.addAttribute("", "width", "width", "",
                    String.valueOf(legend.getWidth()));
                attrs.addAttribute("", "height", "height", "",
                    String.valueOf(legend.getHeight()));

                start("LegendURL", attrs);

                element("Format", legend.getFormat());
                attrs.clear();
                attrs.addAttribute("", "xmlns:xlink", "xmlns:xlink", "",
                    XLINK_NS);
                attrs.addAttribute(XLINK_NS, "type",
                    "xlink:type", "", "simple");
                attrs.addAttribute(XLINK_NS, "href",
                    "xlink:href", "", legend.getOnlineResource());

                element("OnlineResource", null, attrs);

                end("LegendURL");
            } else {
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.LegendURL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.