Statistics
| Revision:

root / branches / v02_desarrollo / libraries / libCq CMS for java.old / src-dvp / org / cresques / io / GrafCanMapServerClient.java @ 1527

History | View | Annotate | Download (1.26 KB)

1
/*
2
 * Created on 12-dic-2004
3
 */
4
package org.cresques.io;
5

    
6
import org.cresques.px.Extent;
7

    
8
/**
9
 * Consulta el servidor de mapas de grafcan.
10
 * Implementa una llamada del tipo:
11
 * http://www.dgtcan.com/MapServer/Mapa.asp?
12
 *   XMin=219900&YMax=3151900&XMax=221000&YMin=3151300&
13
 *   Ancho=1000&Alto=1000&NumeroCapas=6&Capas=2&Servicio=NavGRAFCAN2
14
 * @author Luis W. Sevilla (sevilla_lui@gva.es)
15
 */
16
public class GrafCanMapServerClient extends MapServerClient {
17
        public final static int CAPA_ORTOFOTO    = 2;
18
        public final static int CAPA_CARTOGRAFIA = 1;
19
        
20
        private int numeroCapas        = 6;
21
        private int capas                = CAPA_CARTOGRAFIA;
22
        private String servicio = "NavGRAFCAN2";
23
        
24
        public GrafCanMapServerClient(String serverName) {
25
                super(serverName);
26
                urlBase = "http://www.dgtcan.com/MapServer/Mapa.asp";
27
/**/        setExtent(new Extent(180020,3270000,660000,3035000));
28
        }
29
        
30
        public void setCapas(int c) { capas = c; }
31
        
32
        public void setNumeroCapas(int c) { numeroCapas = c; }
33
        
34
        public void setServicio(String s) { servicio = s; }
35
        
36
        public String getUrl() {
37
                String url = urlBase+"?"+
38
                        "XMin="+xMin+"&"+ "XMax="+xMax+"&"+
39
                        "YMin="+yMin+"&"+ "YMax="+yMax+"&"+
40
                        "Ancho="+ancho+"&"+"Alto="+alto+"&"+
41
                        "NumeroCapas="+numeroCapas+"&"+"Capas="+capas+"&"+
42
                        "Servicio="+servicio;
43
                return url;
44
        }
45
}