ArcGIS for JS Argus map limits the display of specific areas

Time:2020-11-22

ArcGIS map services restrict specific areas and mask other maps that are not displayed

Method 1: using canvasclearRectMethod to achieve the effect of hollowing out
Method 2: using the path of canvas to achieve the effect of hollowing out

Clearrect method:

        var c=document.getElementById("myCanvas");
        var ctx=c.getContext("2d");
        ctx.fillStyle="#fff";
        ctx.fillRect(0,0,300,150);
        ctx.clearRect(20,20,100,50);

Recommended Today

Explain module, import and export in JavaScript

Author: Tania rascia Crazy technology house Original text:https://www.taniarascia.com/j… In the era of the Internet, websites are mainly developed with HTML and CSS. If you load JavaScript into a page, it usually provides effects and interactions in the form of small fragments. Generally, all JavaScript code is written in a file and loaded into a filescriptTag. […]