I'm perplexed and frustrated with trying to get a
simple map to display. I've followed the tutorials,
but am still stuck. I'm using Tiger data files. I'm
using GeoTools 2.2.0M with Java 1.4.2 on a Fedora
First, I tried building the Styles I needed in code.
This worked fine with LineSymbolizers. Then, I tried
to add labels by creating a TextSymbolizer. This led
to the following error:
Fename is not in stated schema .
I know "Fename" is correct. So, I looked at the
setAttribute method in AttributeExpressionImpl2 and it
became clear that correctness was irrelavent - the
above message is the only possible response from this
class. I figured I had hit a dead end here.
So, I turned to the SLD classes. It was quite easy to
create the SLD file and obtain styles using the
Style waterstyle = null;
SLDParser parser = new
waterstyle = parser.readXML();
} catch (....snipped
Unfortunately, this doesn't render correctly in the
StyledMapPane. All I get is a blank, gray screen
(though the scale does appear and responds to zoom
events). I also tried using the SLDStyle object,
despite it being deprecated, again without success.
I've included "mybasicfile.sld" below. I'm not
committed to either approach (setting the styles in
code of through an SLD descriptor), as long as I can
get one or the other to work. What am I doing wrong?
I'm sure it's a stupid newbie mistake, but it's
preventing me from moving forward. Any suggestions
are greatly appreciated!
P.S. Here's mybasicfile.sld
The only "dumb question" is the one you were too afraid to ask.
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
Get a handle on your data with "pocOLAP", the "little" OLAP project
Yahoo! Mail - PC Magazine Editors' Choice 2005