Previously, tagged nodes of ways were shown on the browse/way and
browse/relation pages.
Now, nodes are not shown on browse/way pages and only nodes which are
direct members of the relation are shown on browse/relation pages.
url: OSM.apiUrl(object),
dataType: "xml",
success: function (xml) {
url: OSM.apiUrl(object),
dataType: "xml",
success: function (xml) {
- objectLayer = new L.OSM.DataLayer(xml, {
+ objectLayer = new L.OSM.DataLayer(null, {
style: {
strokeColor: "blue",
strokeWidth: 3,
style: {
strokeColor: "blue",
strokeWidth: 3,
+ objectLayer.interestingNode = function (node, ways, relations) {
+ if (object.type === "node") {
+ return true;
+ } else if (object.type === "relation") {
+ for (var i = 0; i < relations.length; i++)
+ if (relations[i].members.indexOf(node) != -1)
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ objectLayer.addData(xml);
+
var bounds = objectLayer.getBounds();
if (zoom) {
var bounds = objectLayer.getBounds();
if (zoom) {