Skip to main content

JXMapKit - Overlay rendering quality

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
lanthale
Offline
Joined: 2010-01-19
Points: 0

I am using JXMapKit to display a map with a overlay which is drawing lines on the map. The function is there but anybody can see pixels of the line. Is there a way to improve the rendering quality of all overlays or of the complete JXMapKit so that I can get smooth lines ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lanthale
Offline
Joined: 2010-01-19
Points: 0

Here is the answer:
Just add to each overlay painter inside of the paint method the following line as the first code line:
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIASING_ON);