I have developed a map at https://afterfibre.nsrc.org/af_dev.html which should display a custom attribution in the lower right corner:
L.tileLayer('https://dnv9my2eseobd.cloudfront.net/v3/cartodb.map-4xtxp73f/{z}/{x}/{y}.png', { attribution: 'Undersea cable data courtesy Greg Malknecht
Mapbox Terms & Feedback' }).addTo(map_object);and should have a custom legend:
var aftLegend = new cdb.geo.ui.Legend.Custom({ title: "Fibre Status", data: [ { name: "Live", value: "#58A062" }, { name: "Under Construction", value: "#F07971" } ] }); $('#map_object').append(aftLegend.render().el);but no legend appears and the attribution remains the default. The map seems to work well in every other respect. No javascript errors detected. The full code is at
https://github.com/stevesong/nsrc-afterfibre/blob/master/af_dev.html
I have been through it several times but am at a loss to work out what I am doing wrong. Any assistance gratefully received.
أكثر...
L.tileLayer('https://dnv9my2eseobd.cloudfront.net/v3/cartodb.map-4xtxp73f/{z}/{x}/{y}.png', { attribution: 'Undersea cable data courtesy Greg Malknecht
Mapbox Terms & Feedback' }).addTo(map_object);and should have a custom legend:
var aftLegend = new cdb.geo.ui.Legend.Custom({ title: "Fibre Status", data: [ { name: "Live", value: "#58A062" }, { name: "Under Construction", value: "#F07971" } ] }); $('#map_object').append(aftLegend.render().el);but no legend appears and the attribution remains the default. The map seems to work well in every other respect. No javascript errors detected. The full code is at
https://github.com/stevesong/nsrc-afterfibre/blob/master/af_dev.html
I have been through it several times but am at a loss to work out what I am doing wrong. Any assistance gratefully received.
أكثر...