Setting Copyrights Explicitly

In the following sample, the copyright of the TileLayer is set explicitly. For simple applications with only one layer, this approach may be sufficient. The Copyright information is requested from the xRuntime service. Its response has the following structure:


    {
        basemap : ["PTV Group", "HERE", "AND"],
        featureLayers : [
            {
                themeId : "PTV_TruckAttributes",
                copyright : ["HERE", "PTV Group"]
            },
            {
                themeId : "PTV_TrafficIncidents",
                copyright : ["TomTom", "PTV Group"]
            },
            ...
        ]
    }
            

You can now compile the list of applicable copyrights and set it as attribution of the TileLayer.
Important: To fully comply with PTV's legal requirements a copyright sign and the current year have to be added as shown in this sample.