Page 1 of 1

Rendering map is slower with leaflet then ajaxmaps

Posted: Wed Oct 06, 2021 1:30 pm
by broadhorizon
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.
Schermafbeelding 2021-10-06 152449.png
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

Re: Rendering map is slower with leaflet then ajaxmaps

Posted: Mon Oct 11, 2021 8:22 am
by Bernd Welter
Hello Lanzo,

my first question regarding this topic: how many backend mapping modules are in use?
Are you aware of this post: https://xserver.ptvgroup.com/forum/view ... f=15&t=972

Bernd