[GIS] Seeking Java GIS framework with custom shaped markers

coordinatesjavamarkerssoftware-recommendations

I am completely new to GIS.

I need to find an open-source Java framework/library/api that would generate an map image with multiple coordinates markers. In particular I need to customize the shape of the markers (i.e. making the marker circle size bigger or smaller depending on external additional data). Moreover, it would be nice that the map would fit to the markers (so if I place markers only in Europe, the image would show Europe only, not the whole globe). The target display is a java webapp so I would nee to generate the image and get it in a byte form, so I can display it on the page.

Does any one know an Java API that has such functionality?

I looked at things like geotools or jmapviewer but they seem to lack the features I require.

Best Answer

If you are making a java webabb, you could use OpenLayers (a Javascript mapping api) for displaying markers).

I guess you could in some way generate a GeoJSON of your data, e.g. follow some of the examples on OpenLayers Vector Layers.

Here is one such example (well, generating data on the fly): http://openlayers.org/dev/examples/styles-context.html

And for the "map fit the contents"-requirement, use something like:

map.zoomToExtent(myvectorlayer.getDataExtent();
Related Question