mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Add tooltips to mapillary map features layer icons (close #7079)
This commit is contained in:
@@ -1073,6 +1073,38 @@ en:
|
||||
title: "Map Features"
|
||||
tooltip: "Map features from Mapillary"
|
||||
request_data: "Request Data"
|
||||
construction:
|
||||
flat:
|
||||
crosswalk_plain: plain crosswalk
|
||||
marking:
|
||||
discrete:
|
||||
crosswalk_zebra: zebra crosswalk
|
||||
object:
|
||||
banner: banner
|
||||
bench: bench
|
||||
bike_rack: bike rack
|
||||
catch_basin: catch basin
|
||||
cctv_camera: CCTV camera
|
||||
fire_hydrant: fire hydrant
|
||||
mailbox: mailbox
|
||||
manhole: manhole
|
||||
phone_booth: phone booth
|
||||
sign:
|
||||
advertisement: advertisement
|
||||
information: information sign
|
||||
store: shop sign
|
||||
street_light: street light
|
||||
support:
|
||||
utility_pole: utility pole
|
||||
traffic_cone: traffic cone
|
||||
traffic_light:
|
||||
cyclists: cyclist traffic light
|
||||
general_horizontal: horizontal traffic light
|
||||
general_single: single traffic light
|
||||
general_upright: vertical traffic light
|
||||
other: traffic light
|
||||
pedestrians: pedestrian traffic light
|
||||
trash_can: trash can
|
||||
mapillary:
|
||||
title: Mapillary
|
||||
signs:
|
||||
|
||||
42
dist/locales/en.json
vendored
42
dist/locales/en.json
vendored
@@ -1344,7 +1344,47 @@
|
||||
"mapillary_map_features": {
|
||||
"title": "Map Features",
|
||||
"tooltip": "Map features from Mapillary",
|
||||
"request_data": "Request Data"
|
||||
"request_data": "Request Data",
|
||||
"construction": {
|
||||
"flat": {
|
||||
"crosswalk_plain": "plain crosswalk"
|
||||
}
|
||||
},
|
||||
"marking": {
|
||||
"discrete": {
|
||||
"crosswalk_zebra": "zebra crosswalk"
|
||||
}
|
||||
},
|
||||
"object": {
|
||||
"banner": "banner",
|
||||
"bench": "bench",
|
||||
"bike_rack": "bike rack",
|
||||
"catch_basin": "catch basin",
|
||||
"cctv_camera": "CCTV camera",
|
||||
"fire_hydrant": "fire hydrant",
|
||||
"mailbox": "mailbox",
|
||||
"manhole": "manhole",
|
||||
"phone_booth": "phone booth",
|
||||
"sign": {
|
||||
"advertisement": "advertisement",
|
||||
"information": "information sign",
|
||||
"store": "shop sign"
|
||||
},
|
||||
"street_light": "street light",
|
||||
"support": {
|
||||
"utility_pole": "utility pole"
|
||||
},
|
||||
"traffic_cone": "traffic cone",
|
||||
"traffic_light": {
|
||||
"cyclists": "cyclist traffic light",
|
||||
"general_horizontal": "horizontal traffic light",
|
||||
"general_single": "single traffic light",
|
||||
"general_upright": "vertical traffic light",
|
||||
"other": "traffic light",
|
||||
"pedestrians": "pedestrian traffic light"
|
||||
},
|
||||
"trash_can": "trash can"
|
||||
}
|
||||
},
|
||||
"mapillary": {
|
||||
"title": "Mapillary",
|
||||
|
||||
@@ -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