Comments:

mine won't execute either! although I have the MapToolViewer and SpearfishPostGIS demos working fine. It seems I am missing some jars, i'm just not sure which. My error message is:

Exception in thread "main" java.lang.NoSuchMethodError: org.opengis.referencing.IdentifiedObject.getAlias()[Lorg/opengis/util/GenericName;
at org.geotools.referencing.wkt.Formatter.getName(Formatter.java:587)
at org.geotools.referencing.wkt.Formatter.append(Formatter.java:246)
at org.geotools.referencing.wkt.Formattable.toWKT(Formattable.java:181)
at org.geotools.referencing.wkt.Formattable.toWKT(Formattable.java:147)
at org.geotools.referencing.wkt.Formattable.toWKT(Formattable.java:126)
at org.geotools.referencing.wkt.Formattable.toWKT(Formattable.java:108)
at org.geotools.cs.CoordinateSystem.fromGeoAPI(CoordinateSystem.java:324)
at org.geotools.renderer.j2d.StyledMapRenderer.setMapContext(StyledMapRenderer.java:125)
at org.geotools.gui.swing.StyledMapPane.setMapContext(StyledMapPane.java:114)
at MapLegendViewer.<init>(MapLegendViewer.java:108)
at MapLegendViewer.main(MapLegendViewer.java:191)

any ideas would be very welcome!

Posted by melissa.loudon@gmail.com at Jun 13, 2005 15:45

The interfaces for coordinate transformations have changed since this demo was written. The CoordinateSystem.fromGeoAPI() method is trying to bridge between the old and new coordinate (reference) system objects and appears to be failing. Unfortunately you may need to wait for the demo to be updated or explore why the coordinate (reference) system being used is causing errors. I suspect the fromGeoAPI() method has not been updated to the latest api.