We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bcc94e commit 569f534Copy full SHA for 569f534
src/components/EnhancedMap/SourcedTileLayer/SourcedTileLayer.jsx
@@ -60,6 +60,14 @@ const SourcedTileLayerInternal = (props) => {
60
61
const normalizedLayer = normalizeLayer(props.source);
62
63
+ // Skip rendering if the tile URLhas unresolved template variables (e.g. {apikey})
64
+ if (normalizedLayer.url) {
65
+ const unresolvedVars = normalizedLayer.url.match(/\{(?!s|x|y|z|r\})[a-zA-Z_]+\}/g);
66
+ if (unresolvedVars?.length > 0) {
67
+ return null;
68
+ }
69
70
+
71
const handleTileError = () => {
72
setLayerRenderFailed(true);
73
};
0 commit comments