aaime wrote:
>
> Use a PointSymbolizer with an ExternalGraphic pointing to a path
> containing your image (encodedin png/svg/whatever).
> And of course you'll need to apply it to a point feature source
>
Thanks for your reply,
here is my possible code:
StyleBuilder styleBuilder = new StyleBuilder();
PointSymbolizer pointSymbolizer = styleBuilder.createPointSymbolizer();
Graphic gr = styleBuilder.createGraphic();
ExternalGraphiс eGr = styleBuilder.createExternalGraphic(
"file:///C:/tst.gif", "image/gif");
gr.graphicalSymbols().add( eGr );
pointSymbolizer.setGraphic(gr);
StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null);
Style style = styleFactory.createStyle();
FeatureSource featureSource = ??
MapLayer layer = new DefaultMapLayer(featureSource, style);
getMapContext().addLayer(layer);
Don't understand, how I can apply PointSymbolizer to FeatureSource?
And another question, where and how I should set coordinates of the point?
--
View this message in context:
http://n2.nabble.com/How-to-display-gif-or-png-image-on-JMapPane-tp4870236p4871186.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users