custom tooltip generates "mapView should be present" error

المشرف العام

Administrator
طاقم الإدارة
I am trying to apply the custom tooltip example from http://bl.ocks.org/xavijam/6efe7494eee798a0dbf5 to my map at https://afterfibre.nsrc.org/af_dev.html The code seems relatively straightforwardL:

var aftTooltip = new cdb.geo.ui.Tooltip({ layer: aftLayer, template: '

{{operator}}





', width: 200, position: 'bottom|right' }); $('#cartodb-map').append(aftTooltip.render().el); And yet the tooltips do not render and the console produces an error that says: "Uncaught Error: mapView should be present". I've googled for this error but not much comes up. Full code at https://github.com/stevesong/nsrc-afterfibre/blob/master/af_dev.html

No doubt I am missing something obvious. Grateful for any suggestions.



أكثر...
 
أعلى