Fix #3696 Various fixes, utils and drawSupport#3697
Fix #3696 Various fixes, utils and drawSupport#3697MV88 merged 2 commits intogeosolutions-it:masterfrom
Conversation
mbarto
left a comment
There was a problem hiding this comment.
Looks good, just one minor question
web/client/plugins/Map.jsx
Outdated
| return [...this.props.layers, ...this.props.additionalLayers].filter(this.filterLayer).map((layer, index) => { | ||
| return ( | ||
| <plugins.Layer type={layer.type} srs={projection} position={index} key={layer.id || layer.name} options={layer} securityToken={this.props.securityToken}> | ||
| <plugins.Layer type={layer.type} srs={projection} position={index} key={layer.id || layer.name || uuidv1()} options={layer} securityToken={this.props.securityToken}> |
There was a problem hiding this comment.
What the use case for a layer without both id and name? Do you have an example?
There was a problem hiding this comment.
when you use a vector layer in the additionalLayers list
There was a problem hiding this comment.
I suggest to add unique id to every additional layer you create. I suggest to assign one on creation. If missing, please use a default one in reducer, @mbarto do you agree?
There was a problem hiding this comment.
@offtherailz i'm just passing a random value if it does not exist to the key prop to avoid have a warning in the console
There was a problem hiding this comment.
The warning, in that case, is correct. If some layer has id or name missing, probably you're doing something wrong, and it is better to be notified of this.
Description
this pr provides fixes in CoordinateUtils, MapUtils, and it removes various warnings from console
Issues
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
What is the current behavior? (You can also link to an open issue here)
see issue
What is the new behavior?
you can draw marker from "start" drawStatus, and "Marker" DrawMethod
getGeoJSONExtent works with simple Feature
Does this PR introduce a breaking change? (check one with "x", remove the other)
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:
can cause conflicts with Annotations branch