mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 16:19:48 +02:00
Add tooltips to mapillary map features layer icons (close #7079)
This commit is contained in:
@@ -16,26 +16,26 @@ var clientId = 'NzNRM2otQkR2SHJzaXJmNmdQWVQ0dzo1ZWYyMmYwNjdmNDdlNmVi';
|
||||
var mapFeatureConfig = {
|
||||
organizationKey: 'FI3NAFfzQQgdF081TRdgTy',
|
||||
values: [
|
||||
'construction--flat--crosswalk-plain',
|
||||
'marking--discrete--crosswalk-zebra',
|
||||
'object--banner',
|
||||
'object--bench',
|
||||
'object--bike-rack',
|
||||
'object--billboard',
|
||||
'object--catch-basin',
|
||||
'object--cctv-camera',
|
||||
'object--fire-hydrant',
|
||||
'object--mailbox',
|
||||
'object--phone-booth',
|
||||
'object--street-light',
|
||||
'object--support--utility-pole',
|
||||
'object--traffic-light--pedestrians',
|
||||
'object--trash-can',
|
||||
'construction--flat--crosswalk-plain',
|
||||
'object--cctv-camera',
|
||||
'object--banner',
|
||||
'object--catch-basin',
|
||||
'object--manhole',
|
||||
'object--phone-booth',
|
||||
'object--sign--advertisement',
|
||||
'object--sign--information',
|
||||
'object--sign--store',
|
||||
'object--street-light',
|
||||
'object--support--utility-pole',
|
||||
'object--traffic-light--*',
|
||||
'marking--discrete--crosswalk-zebra'
|
||||
'object--traffic-light--pedestrians',
|
||||
'object--trash-can'
|
||||
].join(',')
|
||||
};
|
||||
var maxResults = 1000;
|
||||
|
||||
@@ -2,7 +2,7 @@ import _throttle from 'lodash-es/throttle';
|
||||
import { select as d3_select } from 'd3-selection';
|
||||
import { svgPointTransform } from './helpers';
|
||||
import { services } from '../services';
|
||||
|
||||
import { t } from '../util/locale';
|
||||
|
||||
export function svgMapillaryMapFeatures(projection, context, dispatch) {
|
||||
var throttledRedraw = _throttle(function () { dispatch.call('change'); }, 1000);
|
||||
@@ -103,6 +103,10 @@ export function svgMapillaryMapFeatures(projection, context, dispatch) {
|
||||
.attr('x', '-12px')
|
||||
.attr('y', '-12px')
|
||||
.attr('xlink:href', function(d) { return '#' + d.value; })
|
||||
.attr('title', function(d) {
|
||||
var id = d.value.replace(/--/g, '.').replace(/-/g, '_');
|
||||
return t('mapillary_map_features.' + id);
|
||||
})
|
||||
.classed('currentView', function(d) {
|
||||
return d.detections.some(function(detection) {
|
||||
return detection.image_key === selectedImageKey;
|
||||
|
||||
Reference in New Issue
Block a user