Hi everybody! Is there any way (method, utility class) to draw an animated curve on a JMapPane component.
In fact what I want to do is this:
I have a list of coordinates that represents succesives registred position of an object that I want to track. On my map I want to add a facility to show just like a progressive line the movement of that object by ploting every coordinate in the list on the map. But I want this process to be continuous (like if the line was drawing itself) from time t0 to time t1 where t1 - t0 != 0.
If anyone have done this before, some tips or guidance will be very helpfull.

And then I have another problem, I can't display label on my map even though I use a TextSymbolizer.
I tried this but it didn't work:

 if(layerName.equals(ConstantValues.AGENT_LAYER_NAME) && SABC_RED == null){
                   

                    Mark textMark = sb.createMark(sb.attributeExpression("Nom"),
                        sb.createFill(Color.RED, 0.5), null);
                    Graphic graph = sb.createGraphic(null, new Mark[] { textMark }, null,
                        1, 5, 0);
                        newStyle.addFeatureTypeStyle(sb.createFeatureTypeStyle("AgentPoint",
                        new Symbolizer[] { pointSymbolizer, sb.createPointSymbolizer(graph) }));
                        SABC_RED = newStyle;
                  
                }else{
                    newStyle.addFeatureTypeStyle(sb.createFeatureTypeStyle(pointSymbolizer));
                }
 }
MapLayer maplayer = new DefaultMapLayer(sourceM, newStyle);

For another situation I tried this also but the result wasen't better:

                PolygonSymbolizer ps = sb.createPolygonSymbolizer(color1, color2, 2);
                FilterFactory ff = FilterFactoryFinder.createFilterFactory();
                Font font = FontImpl.createDefault(ff);
                TextSymbolizer ts = sb.createTextSymbolizer(Color.BLACK, font, "quartier");              
                newStyle.addFeatureTypeStyle(sb.createFeatureTypeStyle(ps));
                MapLayer maplayer = new DefaultMapLayer(sourceM, newStyle);

If there is something I'm doing wrong please just tell me. I need to have this project very soon but still stuck on 'basic' issues.

P.S: I'm using geotools-2.5.6 and Netbeans 6.7.1

Thanks in advance for reading and possible help!




Achetez un nouveau PC et bénéficiez de Windows 7 dès sa sortie ! En savoir plus