Hello,
I was wondering if it was normal how slow arcgis API JS laods WMS layers.Here is an example:
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Intro</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
require(["esri/Map", "esri/views/MapView", "esri/layers/WMSLayer", "esri/widgets/LayerList"], function(
Map,
MapView,
WMSLayer,
LayerList,
) {
const map = new Map({
basemap: "streets-navigation-vector"
});
const view = new MapView({
container: "viewDiv",
map: map,
zoom: 3,
center: {
latitude: 32.7353,
longitude: -117.1490
}
});
var layer_precipitations = new WMSLayer({
title: "Précipitation radar",
sublayers: [{
name: "RADAR_1KM_RRAI",
title: "precipitations",
popupEnabled: false,
queryable: false,
visible: true,
}, ],
visible: true,
});
map.add(layer_precipitations);
var layerList = new LayerList({
view: view,
});
view.ui.add(layerList, {
position: "top-left"
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
The page takes about 4 seconds to load with chrome, and about 8 seconds with firefox. If I try loading the same layer with leaflet or openlayers, it doesnt even take 1 second.
Any one knows how I can make it faster?
Thank you!
Julien