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 #10835 fix load map error #10842

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 1 addition & 2 deletions web/client/components/map/openlayers/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ class OpenlayersMap extends React.Component {
this.map.updateSize();
}, 0);
}
const centerIsUpdated = this.isNearlyEqual(newProps.center.y, this.props.center.y) &&
this.isNearlyEqual(newProps.center.x, this.props.center.x);
const centerIsUpdated = !isEqual(newProps.center, this.props.center);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did additional test locally, with this fix seems to work but as soon as I move the map there is a tile reload

tile-reload.mp4

tested also with:

const centerIsUpdated = newProps.center !== this.props.center;

but it seems the same

I think for the moment is better to revert the commit


if (this.map && ((this.props.projection !== newProps.projection) || centerIsUpdated || this.haveResolutionsChanged(newProps)) || this.haveRotationChanged(newProps) || this.props.limits !== newProps.limits) {
if (this.props.projection !== newProps.projection || centerIsUpdated || this.props.limits !== newProps.limits || this.haveRotationChanged(newProps)) {
Expand Down