Hi !!!
I'm working with a vector map made in Java Mapscript, with 2 layers, and i need that one of them has labels to identify a way, but when the program runs, mapserver draws a very little ununderstandable labels, and it doesn't take the font size change. Someone can help me with this??? thanks.
here's my code:
Capa = new layerObj(Mapa);
Capa.setName("Vias");
Capa.setType(mapscriptConstants.MS_LAYER_LINE);
Capa.setStatus(mapscriptConstants.MS_ON
);
String Comando = new String("the_geom FROM (select gid, the_geom, nomb_comun||' '||nomvial as Nombre FROM "+Localidad+" WHERE codigo IN ("+CodigoVia+","+CodigoInterseccion+")) AS ViasMapa USING UNIQUE gid USING SRID=-1");
Capa.setData(Comando);
Capa.setLabelitem("Nombre");
Capa.setConnection("user=geotrans dbname=Geotrans host=localhost");
Capa.setConnectiontype
(mapscriptConstants.MS_POSTGIS);
Clase = new classObj(Capa);
Estilo = new styleObj(Clase);
Estilo.setColor(new colorObj(255,0,0,0));
labelObj Etiquetas = new labelObj();
Etiquetas.setSize(18);
Etiquetas.setColor(new colorObj(0,255,255,0));
Etiquetas.setType(mapscriptConstants.MS_TRUETYPE);
Etiquetas.setAntialias(mapscriptConstants.MS_TRUE
);
Etiquetas.setPosition(mapscriptConstants.MS_CL);
Etiquetas.setPartials(mapscriptConstants.MS_FALSE);
Etiquetas.setMindistance(300);
Etiquetas.setFont("vera");
Clase.setLabel(Etiquetas);
Mapa.draw().save("/usr/local/tomcat/webapps/geotrans/Mapas/mapaAcc",null);
--
Alejandro Rico
- [UMN_MAPSERVER-USERS] Adding Labels to a Vector Map wit... Alejandro Rico
- Re: [UMN_MAPSERVER-USERS] Adding Labels to a Vecto... Umberto Nicoletti
- Re: [UMN_MAPSERVER-USERS] Adding Labels to a V... Alejandro Rico
- Re: [UMN_MAPSERVER-USERS] Adding Labels to... Alejandro Rico
- Re: [UMN_MAPSERVER-USERS] Adding Label... Umberto Nicoletti
- Re: [UMN_MAPSERVER-USERS] Adding ... Alejandro Rico
- Re: [UMN_MAPSERVER-USERS] Add... Umberto Nicoletti
- Re: [UMN_MAPSERVER-USERS] Adding Labels to a Vecto... Rodriguez, Heraldo
- Re: [UMN_MAPSERVER-USERS] Adding Labels to a V... Alejandro Rico
