onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

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

Open fredericalpers opened 1 week ago

fredericalpers commented 1 week ago

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

Introduction

As mentioned in Issue https://github.com/onOffice-Web-Org/oo-wp-plugin/issues/703#issuecomment-1907305962 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 https://github.com/onOffice-Web-Org/oo-wp-plugin/issues/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

yeneastgate commented 6 days ago

@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 commented 6 days ago

@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 commented 5 days ago

@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.

fredericalpers commented 1 day ago

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