⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genericoverlay.java

📁 j2me写的google地图
💻 JAVA
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2008-6-16 11:20:52
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   GenericOverlay.java

package com.eightmotions.map;

import com.eightmotions.util.UtilMidp;
import java.io.PrintStream;

// Referenced classes of package com.eightmotions.map:
//            MapCustomOverlay, MapCanvas, BufferImage

public class GenericOverlay
    implements MapCustomOverlay
{

    public GenericOverlay()
    {
        m_url = "";
        isTransparent = true;
        name = "Generic";
    }

    public String getTileURL(int x, int y, int z, int sizeSq, boolean isSat)
    {
        int div2 = 1 << z;
        String theUrl = m_url;
        theUrl = UtilMidp.strReplace(theUrl, "!bbox!", "!minlon!,!minlat!,!maxlon!,!maxlat!");
        theUrl = UtilMidp.strReplace(theUrl, "!minlon!", MapCanvas.convLon(x * div2 * sizeSq));
        theUrl = UtilMidp.strReplace(theUrl, "!minlat!", MapCanvas.convLat((y + 1) * div2 * sizeSq));
        theUrl = UtilMidp.strReplace(theUrl, "!maxlon!", MapCanvas.convLon((x + 1) * div2 * sizeSq));
        theUrl = UtilMidp.strReplace(theUrl, "!maxlat!", MapCanvas.convLat(y * div2 * sizeSq));
        theUrl = UtilMidp.strReplace(theUrl, "!x!", x);
        theUrl = UtilMidp.strReplace(theUrl, "!y!", y);
        theUrl = UtilMidp.strReplace(theUrl, "!z!", 17 - z);
        theUrl = UtilMidp.strReplace(theUrl, "!zoom!", z);
        if(m_url.indexOf("!quad!") != -1)
            theUrl = UtilMidp.strReplace(theUrl, "!quad!", BufferImage.computeQuadrantString(x, y, z, m_quad));
        System.out.println(" x:" + x + " y:" + y + " div:" + div2 + " z:" + z);
        System.out.println(theUrl);
        return theUrl;
    }

    public boolean isTransparent()
    {
        return isTransparent;
    }

    public String getName()
    {
        return name;
    }

    String m_url;
    char m_quad[] = {
        '0', '1', '2', '3'
    };
    boolean isTransparent;
    String name;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -