Skip to content

Commit b77b6d6

Browse files
author
Leosvel Pérez Espinosa
committed
2 parents 3917e20 + 6179ae3 commit b77b6d6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/directives/paths.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ angular.module("leaflet-directive").directive('paths', function (leafletLogger,
5858
return;
5959
}
6060
setPathOptions(leafletPath, pathData.type, pathData);
61+
// Show label if defined
62+
if (isDefined(leafletPath) && leafletHelpers.LabelPlugin.isLoaded() && isDefined(pathData.label) && isDefined(pathData.label.message)) {
63+
leafletPath.bindLabel(pathData.label.message, pathData.label.options);
64+
}
65+
66+
// bind popup if defined
67+
if (isDefined(leafletPath) && isDefined(pathData.message)) {
68+
leafletPath.bindPopup(pathData.message, pathData.popupOptions);
69+
}
6170
}, true);
6271
};
6372

0 commit comments

Comments
 (0)