[josm-dev] First release of OpenGL MapView (GSoC)

Michael Zangl openstreetmap at michael.fam-zangl.net
Tue Jun 30 13:46:43 UTC 2015


I am working on providing an OpenGL alternative to the Java2D map view
for this years GSoC. This work has come to a point, where I can release
a first test version and start making changes ready to be merged into JOSM.

Implementing this was pretty challenging. I replace a lot of tasks of
the map view (Drawing the map). But the MapView has so many more
constraints, is accessed as static field, does not really follow the MVC
pattern (or any other design pattern :-(). Simply subclassing it or
writing a second map view is not possible. This is why I am trying to
track the map view. I pass on mouse events to the listeners registered
to the map view, react to redraw requests and pull out the data to draw
when drawing my OpenGL view.

I opened a ticket and described the changes made to JOSM there. It still
needs review, so feel free to comment.

A full diff is here:

I compiled a JOSM version that works with the plugin. You need to use
that version to use the plugin.
You can download the modified JOSM and the plugin here:

You should be able to start JOSM without errors. A new button is in the
toolbar. Whith that button, you can enable OpenGL drawing. You see the
border switching from red to blue and the map rendered in OpenGL. There
might be some issues with the rendering (e.g. textures on areas not
drawing) but it should be useable and mouse/keyboard interaction should
be as usual. You should also be able to use any existing plugins. If you
experience issues, feel free to contact me or open a ticked on Github:
You don't need to report optical issues (textures missing, ...) or that
the scale in the upper left hand corner is hidden sometimes. This is
still work in progress.

Things you can do:
- Test it with your plugins, report any compatibility issues.
- State if there are any objections to deprecating rectangle/polygon
drawing in Navigateable Component.
- Test if there are any issues with synchronizing the addLayer/...

Michael Zangl

More information about the josm-dev mailing list