예제 #1
0
    public void Scale(bool Enlarge)
    {
        if (map == null)
        {
            findMap();
        }
        if (Handler == null)
        {
            findHandler();
        }
        int   currScale   = Handler.CurrScale;
        float scaleAmount = Handler.scaleAmount;
        var   t           = new RangeTileProviderOptions();

        if (Enlarge)
        {
            currScale = (int)Mathf.Min(100, Mathf.Max(1, currScale + scaleAmount));
        }
        else
        {
            currScale = (int)Mathf.Min(100, Mathf.Max(1, currScale - scaleAmount));
        }
        Handler.GetComponent <vars>().CurrScale = currScale;
        t.SetOptions(currScale, currScale, currScale, currScale);
        map.SetExtentOptions(t);
        map.UpdateMap();
    }
예제 #2
0
    public void Scale(int scaleAmount)
    {
        if (map == null)
        {
            findMap();
        }
        if (Handler == null)
        {
            findHandler();
        }
        var t = new RangeTileProviderOptions();

        t.SetOptions(scaleAmount, scaleAmount, scaleAmount, scaleAmount);
        map.SetExtentOptions(t);
        Handler.GetComponent <vars>().CurrScale = scaleAmount;
    }