From: 郭阳耀 <gi...@16...> - 2011-10-06 04:51:06
|
Hi there. I am a beginner in GeoTools. I use GeoTools 8.0-M1 The code if from http://docs.geotools.org/latest/userguide/tutorial/quickstart/eclipse.html ......... MapContentmap=newMapContent(); map.setTitle("Using cached features"); Stylestyle=SLD.createSimpleStyle(featureSource.getSchema()); Layerlayer=newFeatureLayer(cache,style); map.addLayer(layer); // Now display the map JMapFrame.showMap(map); ............. The question is aobut JMapFrame.showMap(MapContext context). Eclipse points out that the method showMap(MapContext ) in the typeJMapFrame is not applicable for the arguments(MapContent ),So it is MapContext ,not MapContent .I change the code: MapContentmap=newMapContent(); to MapContext map = newMapContext(); It works. but eclipse point out that the typeMapContext is deprecated. So How can I use MapContent ? Thanks in advance. |