Diese Website richtet sich an Wiederverkäufer von swisstopo-Produkten und Web-Entwickler. Falls Sie Produkte von swisstopo kaufen möchten, besuchen Sie den swisstopo Onlineshop.
In diesem Beispiel wird die Produktgruppe Landeskarten 1: 50000 eingebunden. Die Formatierung erfolgt direkt im HTML Code.
var formatTemplate = '<tr style="border-bottom: 1px solid black;">' + '<td>[product.mapNumber]</td>' + '<td>[product.titleDe]</td>' + '<td>[product.descriptionDe]</td>' + '<td>[product.price]</td>' + '<td>[product.releaseYear]</td>' + '</tr>';
window.onload=getProducts(1.0, formatTemplate, ['17'],null);
Neuer Code ab dem 1. Januar 2017 window.onload=getProducts(2.0, formatTemplate, ['17'],null);
<table style="border: 1px solid black; border-collapse: collapse;" width="100%"> <thead style="border-bottom: 2px solid black; font-size: 0.8em; background-color: silver; text-align: left;"> <tr> <th>Karten-Nr.</th> <th>Name</th> <th>Beschreibung</th> <th>Preis</th> <th>Erscheinungsdatum</th> </tr> </thead> <tbody id="productOutputContainer"></tbody> </table>