Skip to content

Commit

Permalink
add loading from url encoded streetplan json
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Mar 22, 2024
1 parent e69665d commit 420fa32
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/json-utils_1.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,18 @@ AFRAME.registerComponent('set-loader-from-hash', {
'streetmixStreetURL',
streetURL
);
} else if (streetURL.startsWith('streetplanJSON:')) {
// load from Streetplan encoded JSON in URL
console.log(
'[set-loader-from-hash]',
'Set streetplan-loader streetplanEncJSON to',
streetURL
);
this.el.setAttribute(
'streetplan-loader',
'streetplanEncJSON',
streetURL
);
} else {
// try to load JSON file from remote resource
console.log(
Expand Down

0 comments on commit 420fa32

Please sign in to comment.