Starting from ArcGIS JS 4.6, the map server URL should not have any query parameters. Any query parameters exists in the map server URL will be removed.
To handle this issues, you can override the urlUtils.removeQueryParameters() as below
require(["esri/core/urlUtils"], function(urlUtils) {
urlUtils.removeQueryParameters = function(a){
return a;
};
});
But somehow that's a bad trick. A better way is to use the TileLayer._set() to get rid of the parameters stripping action when setting the URL. i.e.
TileLayer._set('url', 'map_server_url')
Wednesday, March 7, 2018
Using Proxy with ArcGIS JS
For servers without CORS enabled. We can use proxy mechanism to access the services.
This is done by modifying the proxy.ashx.
You can also add any parameters before sending the request to the actual server.
More references could be found at:
https://developers.arcgis.com/javascript/latest/guide/proxies/index.html
Subscribe to:
Posts (Atom)
Sync multiple git repo at once
Use the following command in Linux will do the job: ls -d RepoNames* | xargs -I{} git -C {} pull
-
When Office2003 couldn't find file SKU011.CAB: regedit -> [HKEY_LOCAL_MACHINE] -> [SOFTWARE] -> [Microsoft] -> [Office] -&...
-
The resolution can be changed by editing the BlueStack's registry: HKLM\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0\Height and ...
-
To count the number lines of files / stdout in Linux, we uses "wc -l" to achieve. In Windows, we use the following instead: find...