Hello, and sorry if this is a FAQ (I've checked and could not find any answer).
I'm trying to do a simple task: read and display a shapefile. I've been trying some combinations since this morning without any success so far. I've tried the steps in http://docs.geotools.org/latest/userguide/tutorial/quickstart/netbeans.html (without using maven, I've just added all .jars from the binary distribution to my project). The source code in that example does not compile -- the error is method showMap in class org.geotools.swing.JMapFrame cannot be applied to given types; required: org.geotools.map.MapContext found: org.geotools.map.MapContent reason: actual argument org.geotools.map.MapContent cannot be converted to org.geotools.map.MapContext by method invocation conversion for the line JMapFrame.showMap(map); Changing map to be an instance of MapContext compiles the code, but gives an Exception in thread "main" java.lang.NullPointerException at org.geotools.swing.JMapPane.setTransforms(JMapPane.java:1114) for all shapefiles I've tried. Is there any Geotools version where we can display a shape file without too much hassle? I'm not exactly a Java newbie, but am puzzled: there are variations of this example but none work (with all combinations of versions I've tried). thanks Rafael ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
