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.
how can I customize the popup content if I click on a TrafficIncident or TruckAttribute.
I found in the leaflet-xserver.js the buildDescription function and I wanted to overwrite it.
you must override the prototype. Below the default implementation, which is just a generic formatter for the JSON. You can use this code from xServer-1 as template if you want some advanced formatting. It does also the conversion to english units: https://github.com/ptv-logistics/Leafle ... #L122-L166
What do I have to do to extend the leaflet-xserver.js so, that also the Nontiledlayer implementation can be requested with contentType=JSON to get the click feature
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...
For this use case the solution would be to implement an L.LontiledLayer that uses the /renderMap api (like for .NET [https://github.com/ptv-logistics/xserve ... rovider.cs] ). Currently there's no implementation in Leaflet.xserver for this use case, so you will have to implement it by your own.
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...