Rendering map is slower with leaflet then ajaxmaps

This forum deals with any kind of web based client technology, whether it is the well known java script based Ajax servlet or the upcoming approaches such as Leaflet, OpenLayers and so on.
Post Reply
broadhorizon
Posts: 4
Joined: Tue Sep 08, 2020 10:09 am

Rendering map is slower with leaflet then ajaxmaps

Post 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
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Rendering map is slower with leaflet then ajaxmaps

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply