View Javadoc
1   package fr.ifremer.dali.map.wmts;
2   
3   import org.geotools.data.wmts.WebMapTileServer;
4   import org.geotools.ows.ServiceException;
5   
6   import java.io.IOException;
7   import java.net.URL;
8   
9   /**
10   * Test with a new UserAgent but some request still not working (cf. SatelliteWMTSMapConfiguration)
11   * @author peck7 on 15/06/2019.
12   */
13  public class WebMapTileServer2 extends WebMapTileServer {
14      public WebMapTileServer2(URL serverURL) throws IOException, ServiceException {
15          super(serverURL);
16          getHeaders().put("http.agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.90 Safari/537.36");
17      }
18  
19      @Override
20      protected void setupSpecifications() {
21          specs = new WMTSSpecification2[1];
22          specs[0] = new WMTSSpecification2();
23      }
24  }