display truck attributes layer with leaflet

This forum covers all questions dealing with visualization of data within the native PTV xMap interface. Please remember that additional plugins such as AJAX or Leaflet may be handeled in other forums.

display truck attributes layer with leaflet

Postby loic.caouen » Fri May 10, 2019 4:24 pm

Is there a simple a way to display truck attributes layer with leaflet on xMap 1 ?

With xMap 2 we just need this:
Code: Select all
   tileUrl = "http://xserver-2:50000/services/rest/XMap/tile/{z}/{x}/{y}?storedProfile=default&layers=PTV_TruckAttributes";
   new L.TileLayer(tileUrl, { minZoom: 1, maxZoom: 19 }).addTo(map);

Can we do the same with xMap 1?
loic.caouen
 
Posts: 7
Joined: Mon Dec 17, 2018 3:37 pm

Re: display truck attributes layer with leaflet

Postby Joost » Mon May 13, 2019 6:42 am

You need to configure the Featurelayer via snippet and add that to the layer requests. Have a look at https://svc-eu-n-test.cloud.ptvgroup.co ... flet/split for a working sample.
Joost Claessen
Senior Technical Consultant
PTV Benelux
Joost
 
Posts: 232
Joined: Fri Apr 25, 2014 1:46 pm

Re: display truck attributes layer with leaflet

Postby loic.caouen » Tue May 14, 2019 3:50 pm

Thanks for your help Joost.
I've found in the sample what I needed !
loic.caouen
 
Posts: 7
Joined: Mon Dec 17, 2018 3:37 pm


Return to PTV xMapServer