}
function update() {
- var canEmbed = map.getMapBaseLayerId() !== "tracestracktopo";
+ const layer = map.getMapBaseLayer();
+ var canEmbed = layer && layer.options.canEmbed;
var bounds = map.getBounds();
$("#link_marker")
code: "M"
layerId: "mapnik"
nameId: "standard"
+ canEmbed: true
credit:
id: "make_a_donation"
href: "https://supporting.openstreetmap.org"
code: "Y"
layerId: "cyclosm"
nameId: "cyclosm"
+ canEmbed: true
credit:
id: "cyclosm_credit"
children:
layerId: "cyclemap"
nameId: "cycle_map"
apiKeyId: "THUNDERFOREST_KEY"
+ canEmbed: true
credit:
id: "thunderforest_credit"
children:
layerId: "transportmap"
nameId: "transport_map"
apiKeyId: "THUNDERFOREST_KEY"
+ canEmbed: true
credit:
id: "thunderforest_credit"
children:
code: "H"
layerId: "hot"
nameId: "hot"
+ canEmbed: true
credit:
id: "hotosm_credit"
children: