Hi,

   i'm using the tutorials to help me build my gis app to essentially diplay
my shapfile which is done by selecting the file name via java's file menu
item. I a number of files, 1 of which is called ConstructStyle.java which
implements both StyleFactory, LineSymbolizer which essentially builds my
style. I have another file called ConstructMap.java which implements
MapContext and creates a new ConstructStyle object known as constrStyle.

The problem i'm  having is in my  ConstructMap.java file where i am adding
my featuressource and the style object to the mapcontext object as it says:

ava.lang.ClassCastException: com.mycompany.Map_AppV2.ConstructStyle cannot
be cast to org.geotools.styling.Style
        at com.mycompany.Map_AppV2.ConstructMap.<init>(ConstructMap.java:81)
        at com.mycompany.Map_AppV2.MapApp.main(MapApp.java:41)

Now i was thinking of doing a bog standard try/catch block but would i need
to initialise this again? to let the compiler know that i'm using the
ConstructStyle class? 

>From what i can tell from the notes this is the only thing i need for me to
be able to select my shp file and display my file.

Your help would be much greatful.

http://n2.nabble.com/file/n2227157/Map_AppV2.zip Map_AppV2.zip 
-- 
View this message in context: 
http://n2.nabble.com/Styling-problem-tp2227157p2227157.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to