Package org.geoserver.web.demo

Examples of org.geoserver.web.demo.PreviewLayer


                    Fragment f = new Fragment(id, "preview", ImportSummaryPage.this);

                    ExternalLink link = new ExternalLink("preview", "#");
                    if(layerSummary.getStatus().successful()) {
                        // TODO: move the preview link generation ability to some utility object
                        PreviewLayer preview = new PreviewLayer(layer);
                        String url = "window.open(\"" + preview.getWmsLink() + "&format=application/openlayers\")";
                        link.add(new AttributeAppender("onclick", new Model(url), ";"));
                    } else {
                        link.setEnabled(false);
                    }
                    f.add(link);
View Full Code Here


    class LayerPreviewPanel extends Panel {
        public LayerPreviewPanel(String id, IModel<ImportTask> model) {
            super(id);
           
            LayerInfo layer = model.getObject().getLayer();
            PreviewLayer preview = new PreviewLayer(layer);

            List<PreviewLink> links = new ArrayList<PreviewLink>();
            links.add(new PreviewLink("layerPreview", preview.getWmsLink()+ "&format=application/openlayers"));

            links.add(new PreviewLink("googleearth", "../wms/kml?layers=" + layer.getName()));

            add(new DropDownChoice<PreviewLink>("links", new Model(links.get(0)), links,
                new ChoiceRenderer<PreviewLink>() {
View Full Code Here

TOP

Related Classes of org.geoserver.web.demo.PreviewLayer

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.