All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.meteoinfo.data.mapdata.webmap.YahooSatelliteMapInfo Maven / Gradle / Ivy

There is a newer version: 3.8
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.meteoinfo.data.mapdata.webmap;

/**
 *
 * @author yaqiang
 */
public class YahooSatelliteMapInfo extends TileFactoryInfo {
    // 
    private String version = "2.1";
    // 
    // 

    /**
     * Constructor
     */
    public YahooSatelliteMapInfo() {
        super("YahooSatelliteMap", 1, 17, 19,
                256, true, true, // tile size is 256 and x/y orientation is normal
                "http://maps%1$d.yimg.com/ae/ximg?v=%2$s&t=a&s=256&.intl=%3$s&x=%4$d&y=%5$d&z=%6$d&r=1",
                "x", "y", "z");
        this.baseURL = "http://%1$d.aerial.maps.api.here.com/maptile/%2$s/maptile/newest/satellite.day/%3$d/%4$d/%5$d/256/jpg?lg=%6$s&token=%7$s&requestid=yahoo.prod&app_id=%8$s";
        this.setLanguage("ENG");
    }
//    // 
//    // 
//    // 
//    // 

    @Override
    public String getTileUrl(int x, int y, int zoom) {
        zoom = this.getTotalMapZoom() - zoom;
        int serverNum = this.getServerNum(x, y, 2) + 1;
        //String url = String.format(this.baseURL, serverNum, version, this.getLanguage(), x, ((1 << zoom) >> 1) - 1 - y, zoom + 1);
        String rnd1 = "TrLJuXVK62IQk0vuXFzaig%3D%3D";
        String rnd2 = "eAdkWGYRoc4RfxVo0Z4B";
        String url = String.format(this.baseURL, serverNum, version, zoom, x, y, this.getLanguage(), rnd1, rnd2);
        return url;
    }
   
    // 
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy