-
Notifications
You must be signed in to change notification settings - Fork 0
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
CADENZA-38130 Feat: adding additionalLayers param to showMap API #69
Conversation
sandbox.html
Outdated
@@ -474,9 +474,33 @@ | |||
<label for="embeddingTargetId">Embedding target ID of the map view *</label> | |||
<input name="embeddingTargetId" id="embeddingTargetId" required> | |||
</div> | |||
<div> | |||
<label for="geometry">Additional layers (GeoJSON)</label> | |||
<textarea name="additionalLayers" id="additionalLayers" rows="10" placeholder="featureCollections array"></textarea> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These placeholders are not helpful, they just duplicate the labels. I'd remove them.
} | ||
]} | ||
}] | ||
</small> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples are hard to read in the sandbox, because there are no line breaks and indentation. Proposal:
<small>
<strong>Example:</strong>
<pre>
[
{
"type":"geojson",
"name":"Freiburg",
"content": {
"type": "FeatureCollection",
"features": [ ... ]
}
}
...
]</pre>
</small>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the examples are really lengthy? Do we really need all the info, which makes the sidebar rather long? After all it's only an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Klaus wanted to have the possibility for people to easily copy paste and use it in the input, so for that we need everything, yes. Is this a problem? it's only a few pixels more.
"coordinates":[[[9.598504509838506,52.70992820638244],[8.899110702389294,51.72257425885121],[10.906499617840836,51.725944168909365],[9.598504509838506,52.70992820638244]]], | ||
"type":"Polygon" | ||
} | ||
</small> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<small>
<strong>Example:</strong>
<pre>
{
"type":"Polygon",
"coordinates": [ [ 9.599, 52.71 ], ... ]
}</pre>
</small>
@@ -437,6 +439,11 @@ export class CadenzaClient { | |||
zoomToGeometry, | |||
}); | |||
} | |||
if (additionalLayers) { | |||
additionalLayers.forEach((layer) => | |||
this.#postEvent('importLayer', layer), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Klaus changes this to a request, please coordinate this change with him.
sandbox.html
Outdated
@@ -503,7 +527,21 @@ | |||
</div> | |||
<div> | |||
<label for="geometry">Additional layers (GeoJSON)</label> | |||
<textarea name="additionalLayers" id="additionalLayers" rows="10" placeholder="[ { type: "geojson", name: "Stuttgart", content: { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "coordinates": [ [ [ 9.019743777219759, 48.939075160317145 ], [ 9.060437807540097, 48.70393235548886 ], [ 9.734017619469824, 48.7841975772329 ], [ 9.019743777219759, 48.939075160317145 ] ] ], "type": "Polygon" } } ] } } ]"></textarea> | |||
<textarea name="additionalLayers" id="additionalLayers" rows="10" placeholder="featureCollections array"></textarea> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar changes here and below.
} | ||
]} | ||
}] | ||
</small> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the examples are really lengthy? Do we really need all the info, which makes the sidebar rather long? After all it's only an example.
No description provided.