Put in a link to access the OSM object's details webpage
stevevance opened this issue · comments
Steven Vance commented
When revealing an OpenStreetMap object, add a link that would open a new browser tab and load the object's details webpage. Example 'way' details page.
Yohan Boniface commented
Why not simply creating your own class inheriting from L.Control.RevealOSM, and extending formatContent
?
Something like:
MyControl = L.Control.RevealOSM.extend({
formatContent: function (element) {
var content = L.Control.RevealOSM.prototype.formatContent.call(this, element);
content = content + '<a href="xxxx">Go to details page</a>';
return content
}
});
Steven Vance commented
@yohanboniface I didn't know that would have been possible.