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

Displaying multiple property lists and OSM on one page - Fix after leaflet.js update #847

Open
5 tasks done
fredericalpers opened this issue Jul 1, 2024 · 4 comments · May be fixed by #854
Open
5 tasks done

Displaying multiple property lists and OSM on one page - Fix after leaflet.js update #847

fredericalpers opened this issue Jul 1, 2024 · 4 comments · May be fixed by #854
Assignees
Labels
bug Indicates an unexpected problem or unintended behaviour component: property list Issue, Pull Request or Discussion related to property lists QA Issue or Pull request that is in review
Milestone

Comments

@fredericalpers
Copy link
Contributor

fredericalpers commented Jul 1, 2024

Displaying multiple property lists and OSM on one page - Fix after leaflet.js update

Introduction

As mentioned in Issue #703 (comment) there is still an issue that needs to be addressed.

User Story

As a user of the onOffice WordPress plugin, I want each property list and OSM map on a single page to display the correct properties and maps, so that all information is correctly and clearly presented.

Following the release of the Improve Pagination #695 update, an issue has arisen when multiple property lists and OSM maps are used on the same page. The current state results in an error and no OSM for the second property list. Thus, an additional fix is necessary to ensure that each property list matches the correct OSM map and displays the correct properties.

Error or also see browser console

Uncaught Error: Map container is already initialized.
at e._initContainer (Map.js:1094:10)
at e.initialize (Map.js:136:8)
at new e (Class.js:24:20)
at t.map (Map.js:1750:9)
at immobilienliste-alle-immobilien/:539:21
at immobilienliste-alle-immobilien/:557:7

Task / Requirements

  • Fix the bug mentioned in Leaflet.js Update #703 (comment)
  • Each property list must display a map (if activated and one of the propertys address is shared)
  • Each map must show the correct locations of properties that are displayed in the corresponding list.
  • Ensure that each OSM map displays only the locations of the properties in the corresponding list.
  • Regression tests to ensure that previous functionalities are not affected.
@fredericalpers fredericalpers added bug Indicates an unexpected problem or unintended behaviour component: property list Issue, Pull Request or Discussion related to property lists labels Jul 1, 2024
@fredericalpers fredericalpers added this to the v4.26 milestone Jul 1, 2024
@yeneastgate
Copy link
Contributor

@fredericalpers I have fixed this bug. Please check the link video evidence below:

Note:

  1. Only new users can use this feature. For old users, please copy the template.dist folder to use this feature.
  2. I also encounter the same bug when using Google Maps
    Please check and let me know your opinion. Thanks!

@fredericalpers
Copy link
Contributor Author

@yeneastgate Seems to be working for mutliple lists and OSM now, thank you :)

I also encounter the same bug when using Google Maps
Please check and let me know your opinion. Thanks!

please go ahead and fix this for Google Maps as well

@yeneastgate
Copy link
Contributor

yeneastgate commented Jul 4, 2024

@fredericalpers I have fixed the bug using multiple property lists with OSM map and google map. Here is video evidence:

Please check and let me know your opinion.

@yeneastgate yeneastgate self-assigned this Jul 5, 2024
@fredericalpers
Copy link
Contributor Author

@yeneastgate thank you, we will review this as soon as possible :)

@fredericalpers fredericalpers added the QA Issue or Pull request that is in review label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behaviour component: property list Issue, Pull Request or Discussion related to property lists QA Issue or Pull request that is in review
Projects
None yet
2 participants