Java equivalent of OpenLayers [closed]
Asked Answered
L

10

9

I am looking for a Java library to display map data from various sources, including shapefile, WMS, WFS, Google Maps, possibly ArcIMS, etc. It seems like OpenLayers is the closest thing to what I want, except it's a JavaScript library, and I'm writing a Swing application.

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...

Lists answered 21/5, 2009 at 22:49 Comment(1)
Maybe I accepted this answer too soon, since this was my first question on SO? It seems to have gotten more views but no more input.Lists
K
4

GeoTools is a good bet for this. The Google Maps Terms of Service prohibit accessing Google Maps tiles except through the (JavaScript) Google Maps API, so it's not likely that you'll find a freely available codebase to access them in a Java application. Similar restrictions probably apply to other commercial layers.

Kilderkin answered 23/5, 2009 at 23:0 Comment(1)
I was hoping for something at a higher level of abstraction than Geotools, but I will just have to build what I need on this foundation.Lists
T
4

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.

Twoseater answered 6/3, 2010 at 13:58 Comment(0)
T
3

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.

Tiu answered 26/5, 2009 at 13:46 Comment(0)
D
1

OpenMap is supposedly pretty good.

Warning: the "open" license they use is considered non-free by Fedora and GNU.

Duren answered 23/2, 2011 at 3:58 Comment(0)
C
0

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.

Crelin answered 25/5, 2009 at 7:57 Comment(0)
B
0

Try mapscript for java www.mapserver.org

CU

Burroughs answered 25/5, 2009 at 11:3 Comment(0)
D
0

Have a look at UDig

http://udig.refractions.net/

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

Dichromatic answered 26/5, 2009 at 6:37 Comment(0)
K
0

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.

Kosse answered 24/6, 2009 at 19:39 Comment(0)
F
0

It doesn't handle all the formats you mention but I was successful displaying Web maps using modestmaps for Processing (find it here). A processing PApplet can be embedded in a swing GUI as explained here.

Fitly answered 18/6, 2011 at 19:22 Comment(0)
D
0

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.

Delia answered 3/7, 2012 at 15:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.