Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config): single quote issue #2683

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/geoview-core/public/templates/default-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h4 id="HLCONF7">7. Load config from function call</h4>
<script>
cgpv.api.createMapFromConfig(
'CONF7',
`{
JSON.stringify({
'map': {
'interaction': 'dynamic',
'viewSettings': {
Expand Down Expand Up @@ -273,7 +273,7 @@ <h4 id="HLCONF7">7. Load config from function call</h4>
'components': ['overview-map'],
'corePackages': [],
'theme': 'geo.ca'
}`
})
);

// initialize cgpv and api events, a callback is optional, used if calling api's after the rendering is ready
Expand Down
8 changes: 3 additions & 5 deletions packages/geoview-core/public/templates/sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ <h4 id="HLCONF1">Sanbox Map</h4>
// TODO: the delete has a timeout so we need to wait before trying to recreate the map...
// TO.DOCONT: this should be cleaner
setTimeout(() => {
cgpv.api.createMapFromConfig('sandboxMap', document.getElementById('configGeoview').value)
cgpv.api.createMapFromConfig('sandboxMap', document.getElementById('configGeoview').value.replaceAll("'", '"'))
.then(() => listenToLegendLayerSetChanges('sandboxMap-state', 'sandboxMap'));
}, 1500);
});
Expand Down Expand Up @@ -320,9 +320,7 @@ <h4 id="HLCONF1">Sanbox Map</h4>
});

// Create default map==========================================================================================================
cgpv.api.createMapFromConfig(
'sandboxMap',
`{
cgpv.api.createMapFromConfig('sandboxMap', JSON.stringify({
'map': {
'interaction': 'dynamic',
'viewSettings': {
Expand Down Expand Up @@ -353,7 +351,7 @@ <h4 id="HLCONF1">Sanbox Map</h4>
},
'corePackages': [],
'theme': 'geo.ca'
}`
})
).then(() => listenToLegendLayerSetChanges('sandboxMap-state', 'sandboxMap'));

// initialize cgpv and api events, a callback is optional, used if calling api's after the rendering is ready
Expand Down
Loading