-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot draw atop maps in JAVA2D since Processing 3 beta 6 #118
Comments
Work-around: Switch to P2D, e.g. use
|
I Updated the Java2DMapDisplay.java, and now the examples work in my environment.(JDK1.8, JAVA2D, unfolding0.9.9beta ) I did have to change the examples a bit;
Next the patch difference (used WinMerge):
|
Thanks for the suggestion @r-hmn. Alas, with that change and using P2D/P3D renderer, markers are not visible, and non-markers (i.e. objects drawn atop the map directly) are not at their correct positions when using an offset. |
Thanks @tillnagel Since September i've changed to using jxmapviewer2 as the basis for my development because the "processing" paint-loop was too massive to incorporate. But it was nice to experience unfolding & processing! Cheers |
Java2DMapDisplay uses papplet.g as canvas directly, and thus beginDraw() in mapDisplay.draw() messes up things.
Solution: Either add new method preDraw() and only call beginDraw for OpenGLMapDisplay (and keep it empty in Java2DMapDisplay), or use an offscreen buffer in Java2D too (which might fix #117, too).
The text was updated successfully, but these errors were encountered: