mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-30 00:40:25 +02:00
Switch from hyphen to slash for photo parameter separator (re: #6398)
This commit is contained in:
4
API.md
4
API.md
@@ -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).
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user