You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.
When we call showLabel as in the following example:
var p2 = L.polyline([
[-37.7612, 175.2756],
[-37.7612, 175.2950]
]).addTo(map);
var label = new LeafletLabel({
offset: [-12,-15],
});
label.setContent("20'-50'");
label.setLatLng(p2.getBounds().getCenter());
map.showLabel(label);
We get this following error:
leaflet-src-1.0.2.js:3602 Uncaught TypeError: Cannot read property 'call' of undefined
at NewClass.whenReady (leaflet-src-1.0.2.js:3602)
at NewClass.addLayer (leaflet-src-1.0.2.js:4018)
at NewClass.showLabel (leaflet.label-src.js:544)
at test.html:65
We change the declaration of Leaflet.label declared as a "L.Class" in line 28 in leaflet.label-src.js as:
var LeafletLabel = L.Layer.extend({ ... });
`
It fixed the problem for us...
But is anyone could confirm if this fix is really the correct one?
The text was updated successfully, but these errors were encountered:
Just found this note somewhere...
NOTE: starting with Leaflet 1.0, L.Label is added to Leaflet core as L.Tooltip and this plugin is deprecrated.
Ok... I will use Tooltip !
When we call showLabel as in the following example:
We get this following error:
We change the declaration of Leaflet.label declared as a "L.Class" in line 28 in leaflet.label-src.js as:
var LeafletLabel = L.Layer.extend({ ... });
`
It fixed the problem for us...
But is anyone could confirm if this fix is really the correct one?
The text was updated successfully, but these errors were encountered: