Skip Navigation

[Resolved] My map with all the markers is empty after filtering or Paginating

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 3 voices.

Last updated by stephaneL-3 4 years ago.

Assisted by: Shane.

Author
Posts
#1839185

Tell us what you are trying to do?

I have a list page with all the entries listed and paginated. I have a section with Filters and Search box split with a Map with all the listed marker on the right.
URL: hidden link

The Map displays all markers as it should to start off, but as soon as I select a filter or if I go tot he next or toehr page the Map is loading and empty??

Is there any documentation that you are following?
I have followed a few thread discussing the issue without luck, found the code to create 2 maps one with all markers and one with the filter without luck 🙁

What is the link to your site?
The Page is here: hidden link

#1839599

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I can see the map disappears but can't really comment why without seeing how it works.

Let me set a private reply and someone will take a closer look at how you've set this up.

You may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

#1839665

Hi Nigel, and thank you for your reply, should I wait for your initiating a private reply or?

I have the credentials ready when you are.

Quick question, can 1 map view be setup to behave like the listing result below? ie can it be setup so it displays the listed marker/record under only when paginated or filtered/searched? And show all marker when first landing on the page?
I remember seeing a post about this in a forum with a conditional markup but for the life of me I cannot locate this post again?

Thank you for your time

#1840449

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephane,

Here are the private fields so that you can provide the credentials.

can it be setup so it displays the listed marker/record under only when paginated or filtered/searched? And show all marker when first landing on the page?

If you view has Pagination on it then no it won't. The map will only display the markers for the items that are currently being displayed.

Thanks,
Shane

#1841389

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-11-11 at 10.53.55 AM.png

Hi Stephane,

Ok so I had a quick look at the site for you and saw that there is an error in the console being generate from the Elementor plugin. See Screenshot.

I would recommend getting in touch with the elementor team for them to have a look at this. Given that you are using the AJAX refresh for the results then any Javascript error can interfere.

Unfortunately I don't have permissions to edit the actual view with the pagination and check if the map loads with AJAX pagination disable. However based on what I see now it should work with AJAX disabled.

Thanks,
Shane

#1842449

Hello Shane,
Sorry for the delay, busy times 🙂

Thank you for your reply.

The credentials I provided should give you Admin full access to the views etc. Strange that you couldn't edit the view? (Project List Wide w/Filters)
I did change the Pagination from Ajax to "Pagination enabled with manual transition and page reload", now the Map loads at start and remain jumping to different page via the pagination. However when using any filter it will not load again 🙁
Any idea?

Again I am pretty sure I saw a forum thread about this and it seemed possible to have the Mapp with all marker to start and then using conditional markup show the map with just the Marker listed under the filter.. if this is at all possible I would love to hear how ? sorry but I tried many many things and I cannot work it out.

Other than that the Admin bar JS error is only showing when logged in as admin, not on the front-end visit, I contacte elementor and wait for their reply.

I appreciate your time with this, thanks again.

Stephane

#1842571

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephane,

Everything should be fine now. I've added a simple change to your view that should now produce your desired results.

[wpv-conditional if="( '[wpv-search-term param='wpv_view_count']' ne '' )"]
			<div class="col-sm-5">
				[wpv-map-render map_id="map-prjct1" map_height="325px" single_zoom="8" cluster="on" spiderfy="on" map_type_control="off" street_view_control="off" marker_icon="//entrepreneurspourlaplanete.org/wp-content/uploads/2020/05/maps-eplp-marker.png" background_color="#ffffff" style_json="//entrepreneurspourlaplanete.org/wp-content/uploads/2020/05/Eplp-Mapstyle1.json" cluster_min_size="5"]Chargement en cours ...[/wpv-map-render]
			</div>
          [/wpv-conditional]
          [wpv-conditional if="( '[wpv-search-term param='wpv_view_count']' eq '' )"]
     
			<div class="col-sm-5">
				[wpv-view name="map-all-projects"]
			</div>
          [/wpv-conditional]

I've wrapped your map view and a map in conditionals so that they can display a different set of map based on Pagination and when a search is done.

Secondly the reason why the map wasn't loading after the pagination was because of the map being in a completely separate view.

Please let me know if everything is ok now.

Thanks,
Shane

#1843145

thank you Shane
My issue is resolved now. Thank you!