Package org.openstreetmap.josm.gui.layer.markerlayer

Examples of org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer


     * @see #addLayers
     */
    public static GpxImporterData loadLayers(final GpxData data, final boolean parsedProperly,
            final String gpxLayerName, String markerLayerName) {
        GpxLayer gpxLayer = null;
        MarkerLayer markerLayer = null;
        if (data.hasRoutePoints() || data.hasTrackPoints()) {
            gpxLayer = new GpxLayer(data, gpxLayerName, data.storageFile != null);
        }
        if (Main.pref.getBoolean("marker.makeautomarkers", true) && !data.waypoints.isEmpty()) {
            markerLayer = new MarkerLayer(data, markerLayerName, data.storageFile, gpxLayer);
            if (markerLayer.data.isEmpty()) {
                markerLayer = null;
            }
        }
        Runnable postLayerTask = new Runnable() {
View Full Code Here


    @Test
    public void testReadGpxAndMarker() throws IOException, IllegalDataException {
        List<Layer> layers = testRead("gpx_markers.joz");
        assertTrue(layers.size() == 2);
        GpxLayer gpx = null;
        MarkerLayer marker = null;
        for (Layer layer : layers) {
            if (layer instanceof GpxLayer) {
                gpx = (GpxLayer) layer;
            } else if (layer instanceof MarkerLayer) {
                marker = (MarkerLayer) layer;
            }
        }
        assertTrue(gpx != null);
        assertTrue(marker != null);
        assertEquals(gpx.getName(), "GPX layer name");
        assertEquals(marker.getName(), "Marker layer name");
    }
View Full Code Here

        layer.setAssociatedFile(new File("data.gpx"));
        return layer;
    }

    private MarkerLayer createMarkerLayer(GpxLayer gpx) {
        return new MarkerLayer(gpx.data, "Marker layer name", gpx.getAssociatedFile(), gpx);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer

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.