Package org.openstreetmap.josm.data.imagery.ImageryInfo

Examples of org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryPreferenceEntry


    @Override
    public Element export(ExportSupport support) throws IOException {
        Element layerElem = support.createElement("layer");
        layerElem.setAttribute("type", "imagery");
        layerElem.setAttribute("version", "0.1");
        ImageryPreferenceEntry e = new ImageryPreferenceEntry(layer.getInfo());
        Map<String,String> data = Preferences.serializeStruct(e, ImageryPreferenceEntry.class);
        for (Map.Entry<String,String> entry : data.entrySet()) {
            Element attrElem = support.createElement(entry.getKey());
            layerElem.appendChild(attrElem);
            attrElem.appendChild(support.createTextNode(entry.getValue()));
View Full Code Here


            if (node.getNodeType() == Node.ELEMENT_NODE) {
                Element e = (Element) node;
                attributes.put(e.getTagName(), e.getTextContent());
            }
        }
        ImageryPreferenceEntry prefEntry = Preferences.deserializeStruct(attributes, ImageryPreferenceEntry.class);
        ImageryInfo i = new ImageryInfo(prefEntry);
        return ImageryLayer.create(i);
    }
View Full Code Here

    }

    public void save() {
        List<ImageryPreferenceEntry> entries = new ArrayList<>();
        for (ImageryInfo info : layers) {
            entries.add(new ImageryPreferenceEntry(info));
        }
        Main.pref.putListOfStructs("imagery.entries", entries, ImageryPreferenceEntry.class);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryPreferenceEntry

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.