Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: docs
-
Labels:None
Description
Hi Osgeo-team,
I recently followed the instructions at geotools.org using the
quickstartlink for eclipse (
http://docs.geotools.org/latest/userguide/tutorial/quickstart/eclipse.html
) . There I noticed a failure in the examplecode (the code does not work
proper):
//-codebeginning
MapContent map = new MapContent();
Style style = SLD.createSimpleStyle(featureSource.getSchema());
Layer layer = new FeatureLayer(featureSource, style);
map.addLayer(layer);
// Now display the map
JMapFrame.showMap(map);
//codeend
Eclipse wants to cast map to MapContext. When I enter "geotools tutorial"
in google I get a tutorial on your site with the correct code (using
MapContext). Maybe you could correct the code at geotools at the
quickstart-link. People who want to start with geotools mostlikely start
with it using this quickstartlink . A false code doesn't cause a lot of
Motivation
.
Regards Marvin, Vienna AUT
marvinmccutchan@yahoo.de