Rendering map is slower with leaflet then ajaxmaps
Posted: Wed Oct 06, 2021 1:30 pm
This year we made the step of using Leaflet instead of ajaxmaps.
All is working is fine but we notice that when are zooming out in the map, we see a lot of gray parts.
We are using xServer version 1.32 on premise.
I'm using the code below to initialize the map:
What can I do to increase the performance of the rendering? So less gray parts are shown.
Best regards,
Lanzo van Slooten
All is working is fine but we notice that when are zooming out in the map, we see a lot of gray parts.
We are using xServer version 1.32 on premise.
I'm using the code below to initialize the map:
Code: Select all
var baseProfile = 'ajax';
var xMapWmsUrl = 'http://localhost:50010/WMS/WMS';
var xMapTileUrl = 'http://localhost:50010/WMS/GetTile/{profile}/{x}/{y}/{z}.png';
var xMapAttribution = '<a href="http://www.ptvgroup.com">PTV<\/a>, HERE';
map = new L.Map('mapDiv', {
center: new L.LatLng(lat, lon),
zoom: zoom,
crs: L.CRS.PTVMercator
});
var bgLayer = L.tileLayer(xMapTileUrl, {
maxZoom: 19,
minZoom: 0,
opacity: 1.0,
noWrap: false,
profile: 'xmap-' + baseProfile + 'bg',
attribution: xMapAttribution
}).addTo(map);
var fgLayer = L.tileLayer(xMapTileUrl, {
maxZoom: 19,
minZoom: 0,
opacity: 1.0,
noWrap: false,
transparent: true,
profile: 'xmap-' + baseProfile + 'fg',
attribution: xMapAttribution
}).addTo(map);
What can I do to increase the performance of the rendering? So less gray parts are shown.
Best regards,
Lanzo van Slooten