* photosUsed * Called by the EditSystem to gather the sources being used to make an edit. * We can return the English names of: * - current photo layer (if showing a photo) * - current detection layer (if showing a detection) * These strings will be included in the user's changeset
()
| 277 | * @return {Array<string>} Array of layers currently being used. |
| 278 | */ |
| 279 | photosUsed() { |
| 280 | // These are the English layer names that will appear in the changeset tag if the layer is used. |
| 281 | const LAYERNAMES = { |
| 282 | 'streetside': 'Bing Streetside', |
| 283 | 'mapillary': 'Mapillary', |
| 284 | 'mapillary-detections': 'Mapillary Detected Objects', |
| 285 | 'mapillary-signs': 'Mapillary Traffic Signs', |
| 286 | 'kartaview': 'KartaView' |
| 287 | }; |
| 288 | |
| 289 | const results = []; |
| 290 | |
| 291 | if (this._currPhotoLayerID && this._currPhotoID) { |
| 292 | results.push(LAYERNAMES[this._currPhotoLayerID]); |
| 293 | } |
| 294 | if (this._currDetectionLayerID && this._currDetectionID) { |
| 295 | results.push(LAYERNAMES[this._currDetectionLayerID]); |
| 296 | } |
| 297 | |
| 298 | return results; |
| 299 | } |
| 300 | |
| 301 | |
| 302 | /** |