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.
 
 
 
 
 
 
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to