If you’ve used Google Maps, OpenStreetMap, or nearly any other online mapping tool, you’ve likely run into the very polished interfaces they present. Double-clicking the map to zoom, dragging the map to get around, its all so smooth!

I decided this morning to have an attempt at building something similar to this in Java, with the ability of being able to plug-in most, if not all, of the GUI toolkits floating around. As of the time of writing I’ve created two implementations, one in Swing and another in FengGUI.

Here is a quick demonstration of how it works using Swing (full source):

JFrame frame = new JFrame("SlippyJ Swing Test");
SwingTileContainer stc = new SwingTileContainer();
frame.setSize(1000, 1000);
stc.setSize(1000, 1000);
frame.add(stc);
frame.setVisible(true);
Coordinate center = new Coordinate(41, -74);
Palette palette = new Palette(center, 12, stc, new SwingTileFactory(Palette.OSMSlippyServer));

Check out the repositories below:
SlippyJ-Core
SlippyJ-Swing
SlippyJ-FengGUI