Java equivalent of OpenLayers [closed]
GDAL looks promising, but as far as I can tell there won't be Java bindings until "sometime" in the future.
Just to be clear, I am looking for a single Java API that I can use to display maps from a number of map servers/sources.
Does anyone know if anything like this exists, and if not, where to go from here? Should I build this API on top of GeoTools? Or...
This is a case where you have lots of choice. GeoTools is indeed a low level library and an excellent choice for some hands on work. We recently started using Swing for our example code in order to make tutorials more visual. That said they are tutorial code only and do not represent a multi threaded system such as uDig.
If you are looking for Swing applications to start form there is the Jump family (sadly scattered through a closed development process - OpenJump represents a collection of the various forks), gvSig which has excellent financial backing in Span, and so on.
You may also wish to look at the library side of the deegree project (which I seem to recall produced a desktop application as well?).
I also recommend looking at some of the tiled map viewers produced around Nasa World Wind and Open Street Map datasets. These will be more similar to the OpenLayers experience.
Disclaimer I am on the steering committee for GeoTools, and uDig.
uDig would probably meet your needs just fine if you can work within the RCP framework. I don't have any experience with uDig or NASA World Wind, but if you need to put the map features in an existing application, NASA's World Wind Java SDK is another option. It is extensible and supports industry standards for geospatial data. They have an informative wiki here. I first saw NASA World Wind at JavaOne 2007 and it doesn't look like the Java SDK has really taken off nor does it look like the .Net version is seeing a lot of new releases, but it could meet your needs if they are basic.
I have used MapXtreme for Java, it was pretty good and supported several formats. It is not cheap but it delivers.
It is geared towards rendering vectorial data formats.
You can use it either server or client side.
Try mapscript for java www.mapserver.org
Have a look at UDig
It is based on the eclipse RCP works with Geotools and can display most types of spatial data.
it is open source and seems to have quite a bit of activity
ArcGIS Engine Java will do what you need. It integrates into a fully-integrated GIS platform. There are tools to create cartographic quality maps, publish them, host them out, or to build custom apps.
You can use GoogleMaps if you can embed a Web browser into your Java swing application, try JDIC or DJ Project. Also see Is there a way to embed a browser in Java? I have been working with such solution in C# - embedding IE. However, you must embed a good web browser, usually some native web browser and this limits your such solution.