[Gvsig_desarrolladores] Mostrar icono

Toni Ramiro anrapas en gmail.com
Jue Oct 1 10:05:33 CEST 2009


He realizado una librería que muestra un punto en un mapa. Las instrucciones
que uso para crear el punto y mostrarlo son las siguientes:

FSymbol theSymbol;
theSymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT);
theSymbol.setSize(10);
int idSymbol;
idSymbol = lyr.addSymbol(theSymbol);
try {
            IGeometry geom = ShapeFactory.createPoint2D(punto.getX(),
punto.getY());
            GraphicLayer = mapControl.getMapContext().getGraphicsLayer();
lyr.removeGraphic(grDibujo);
            if (grDibujo == null)
                grDibujo = new FGraphic(geom, idSymbol);
            else
                grDibujo.setGeom(geom);
            lyr.addGraphic(grDibujo);
            mapControl.getViewPort().refreshExtent();
        } catch (Exception e) {
}

-- 
Saludos,
   Toni Ramiro
   <anrapas en gmail.com>
   <aramiro151r en cv.gva.es>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://listserv.gva.es/pipermail/gvsig_desarrolladores/attachments/20091001/4eaa1f7d/attachment.htm 


More information about the gvSIG_desarrolladores mailing list