Switch from hyphen to slash for photo parameter separator (re: #6398)

This commit is contained in:
Quincy Morgan
2020-10-04 20:17:44 -04:00
parent adecabf502
commit 2fa64e7445
5 changed files with 6 additions and 6 deletions

4
API.md
View File

@@ -44,8 +44,8 @@ of iD (e.g. `https://ideditor-release.netlify.app`), the following parameters ar
_Example:_ `photo_overlay=streetside,mapillary,openstreetcam`<br/>
_Available values:_ `streetside` (Microsoft Bing), `mapillary`, `mapillary-signs`, `mapillary-map-features`, `openstreetcam`
* __`photo`__ - The service and ID of the street-level photo to show.<br/>
_Example:_ `photo=streetside-718514589`<br/>
_Available prefixes:_ `streetside-`, `mapillary-`, `openstreetcam-`
_Example:_ `photo=streetside/718514589`<br/>
_Available prefixes:_ `streetside/`, `mapillary/`, `openstreetcam/`
* __`presets`__ - A comma-separated list of preset IDs. These will be the only presets the user may select.<br/>
_Example:_ `presets=building,highway/residential,highway/unclassified`
* __`rtl=true`__ - Force iD into right-to-left mode (useful for testing).

View File

@@ -89,7 +89,7 @@ export function rendererPhotos(context) {
var photoIds = hash.photo.replace(/;/g, ',').split(',');
var photoId = photoIds.length && photoIds[0].trim();
var results = /(.*)-(.*)/g.exec(photoId);
var results = /(.*)\/(.*)/g.exec(photoId);
if (results && results.length >= 3) {
var serviceId = results[1];
var photoKey = results[2];

View File

@@ -540,7 +540,7 @@ export default {
if (!window.mocha) {
var hash = utilStringQs(window.location.hash);
if (imageKey) {
hash.photo = 'mapillary-' + imageKey;
hash.photo = 'mapillary/' + imageKey;
} else {
delete hash.photo;
}

View File

@@ -560,7 +560,7 @@ export default {
if (!window.mocha) {
var hash = utilStringQs(window.location.hash);
if (imageKey) {
hash.photo = 'openstreetcam-' + imageKey;
hash.photo = 'openstreetcam/' + imageKey;
} else {
delete hash.photo;
}

View File

@@ -953,7 +953,7 @@ export default {
if (!window.mocha) {
var hash = utilStringQs(window.location.hash);
if (imageKey) {
hash.photo = 'streetside-' + imageKey;
hash.photo = 'streetside/' + imageKey;
} else {
delete hash.photo;
}