WorldWindJava icon indicating copy to clipboard operation
WorldWindJava copied to clipboard

On WorldWind Java 2.2.0, I cannot display the OpenMapStreet map with the OSMMapnikLayer()

Open Conan42 opened this issue 3 years ago • 2 comments

Hello,

On WorldWind Java 2.2.0, I cannot display the OpenMapStreet map with the OSMMapnikLayer(). Do you have an idea?

Code:

import gov.nasa.worldwind.BasicModel; import gov.nasa.worldwind.Model; import gov.nasa.worldwind.awt.WorldWindowGLCanvas; import gov.nasa.worldwind.globes.Earth; import gov.nasa.worldwind.globes.Globe; import gov.nasa.worldwind.layers.; import gov.nasa.worldwind.layers.Earth.; import javax.swing.*;

public class SimplestPossibleExample extends JFrame { public SimplestPossibleExample() { WorldWindowGLCanvas wwd = new WorldWindowGLCanvas(); wwd.setPreferredSize(new java.awt.Dimension(1000, 800)); getContentPane().add(wwd, java.awt.BorderLayout.CENTER);

    Globe earth = new Earth();

    Layer[] layers = new Layer[]
            {
                    new OSMMapnikLayer(),
                    new StarsLayer(),
                    new LatLonGraticuleLayer(),
            };

    Model model = new BasicModel();
    model.setGlobe(earth);
    model.setLayers(new LayerList(layers));
    wwd.setModel(model);

}

public static void main(String[] args)
{
    java.awt.EventQueue.invokeLater(() -> {
        JFrame frame = new SimplestPossibleExample();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    });
}

}

Conan42 avatar Mar 26 '21 19:03 Conan42

Can you report the log of the operation?... Are you trying to connect behind a proxy?

Il ven 26 mar 2021, 20:11 Conan42 @.***> ha scritto:

Hello,

On WorldWind Java 2.2.0, I cannot display the OpenMapStreet map with the OSMMapnikLayer(). Do you have an idea?

Code:

import gov.nasa.worldwind.BasicModel; import gov.nasa.worldwind.Model; import gov.nasa.worldwind.awt.WorldWindowGLCanvas; import gov.nasa.worldwind.globes.Earth; import gov.nasa.worldwind.globes.Globe; import gov.nasa.worldwind.layers. ; import gov.nasa.worldwind.layers.Earth.; import javax.swing.*;

public class SimplestPossibleExample extends JFrame { public SimplestPossibleExample() { WorldWindowGLCanvas wwd = new WorldWindowGLCanvas(); wwd.setPreferredSize(new java.awt.Dimension(1000, 800)); getContentPane().add(wwd, java.awt.BorderLayout.CENTER);

Globe earth = new Earth();

Layer[] layers = new Layer[]
        {
                new OSMMapnikLayer(),
                new StarsLayer(),
                new LatLonGraticuleLayer(),
        };

Model model = new BasicModel();
model.setGlobe(earth);
model.setLayers(new LayerList(layers));
wwd.setModel(model);

}

public static void main(String[] args) { java.awt.EventQueue.invokeLater(() -> { JFrame frame = new SimplestPossibleExample(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); }); }

}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NASAWorldWind/WorldWindJava/issues/222, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACLC3B47VAYP6YT2MEPUYRDTFTL4LANCNFSM4Z36EKXQ .

quonn77 avatar Mar 27 '21 10:03 quonn77

Hi Alessio, there is no log on the Intellij Idea Run output window. and There is no proxy. It seems to download the tiles, but we cannot see the Mapnik map, whereas with the layer BMNGWMSLayer () it works.

Conan42 avatar Mar 27 '21 17:03 Conan42