From 18f2b21839eb0241ad672d405dd4e7f3d1d157b8 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 26 Oct 2012 18:36:32 -0400 Subject: [PATCH] Support POI selection as well as way selection --- css/map.css | 2 +- js/iD/renderer/Map.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/css/map.css b/css/map.css index 0a35e9cc9..b0419098d 100644 --- a/css/map.css +++ b/css/map.css @@ -3,7 +3,7 @@ image.tile { } /* base styles */ -use, path { +path, image.marker { fill: none; cursor: pointer; } diff --git a/js/iD/renderer/Map.js b/js/iD/renderer/Map.js index 0e140cb6c..a83d41574 100755 --- a/js/iD/renderer/Map.js +++ b/js/iD/renderer/Map.js @@ -230,7 +230,7 @@ iD.Map = function(obj) { var _id = selection[0]; var active_entity = all.filter(function(a) { - return a._id === _id; + return a._id === _id && a.entityType === 'way'; }); var handles = layers[0].hit.selectAll('circle.handle') @@ -260,7 +260,8 @@ iD.Map = function(obj) { .attr('d', nodeline) .attr('class', classes('stroke')); - markers.enter().append('image'); + markers.enter().append('image') + .on('click', selectClick); markers.attr('class', classes('marker')) .attr({ width: 16, height: 16 }) .attr('xlink:href', markerimage)