Rendering maps from raw SVG data in Java
Posted
by Lunikon
on Stack Overflow
See other posts from Stack Overflow
or by Lunikon
Published on 2010-03-14T09:34:19Z
Indexed on
2010/03/14
9:45 UTC
Read the original article
Hit count: 220
In an application of mine I have to display locations and great circle paths in a map which is rendered to PNG and then displayed on the web. For this I simply use a world map (NASA's Blue Marbel in fact) scaled to various "zoom levels" as base image and only display the a part of it matching the final image size and fitting all items to be displayed. Straight forward so far.
Now I came across Wikipedia's awesome blank SVG maps which contain all the country codes for easy reference and I was wondering whether it was possible to use those to have more customized colors and to highliht countries etc. So I did a bit of googling and was looking for Java libraries which would enable me to
- load the blank SVG map to memory
- allows for easy reference/selection of certain paths
- do manipulations of coloring, stroke widths etc
- render to a buffered image as the background for the great-circle paths/nodes
What I came across quite often was Batik, but it looks like a really heavy framework and I'm not quite sure whether it is what I'm looking for. I have recently played around with Raphaël a bit and I like the way it handles working with vector graphics in code. If the Java framework for my purpose would feature a similar interface, that would be a nice-to-have.
Any recommendations what toolset would be approriate for my purposes?
© Stack Overflow or respective owner