Skip Navigation

[Resolved] map pins are showing different than search results.

This support ticket is created 2 years, 10 months 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.

Our next available supporter will start replying to tickets in about 2.83 hours from now. Thank you for your understanding.

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 16 replies, has 2 voices.

Last updated by bxbM 2 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2110345

Tell us what you are trying to do?
I'm trying to show 3 companies in the search. They need to be random. So if the search is for zipcode 91401, there may be 5 companies but only show 3 out of the 5, and randomized. Then the same three companies should show on the map. The map pins are accurate when I press the submit button, but not when the page is refreshed or loaded.
Under: Form submit if I choose "Full page refresh when clicking Submit" it doesn't work. If I choose "AJAX refresh when clicking" it ONLY works accurately when I press the submit button.

I'm also having trouble putting the map at the top of the page instead of the bottom.

Is there any documentation that you are following?
I didn't find anything on this specific problem.

Is there a similar example that we can see?

What is the link to your site?
here is the page I'm playing with:
hidden link

#2110443

Shane
Supporter

Languages: English (English )

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

Hello,

Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this one for you ?

I've enabled the private fields for your next response.

Thanks,
Shane

#2113651

Shane
Supporter

Languages: English (English )

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

Hello,

Thank you for the credentials.

I was able to replicate the issue and attempted to remedy it by remaking the map. However what I noticed is that the Map results are not reflecting what is being displayed in the view.

In a case Like this I would recommend deleting and remaking the view in an attempt to see if the issue still remains after tying to replicate with a new view.

If it does please let me know and we can continue to debug from there.

Thanks,
Shane

#2114269

I have rebuilt the view and still get the same result. The problem is only happening on the first load of the page. Any refreshes are accurate.

#2114343

Shane
Supporter

Languages: English (English )

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

Hello,

I will like to grab a copy of the site for further checks here locally to see exactly what is wrong.

Would it be ok if I took a duplicator package from the site using the duplicator plugin?

Please let me know.
Thanks,
Shane

#2114393

Yes you can get a copy. I rebuilt the entire page, including view. hidden link
I was wrong about the pins being accurate upon refresh...it just seems to be pulling in pins randomly and not reflecting the view search results.
Your help is appreciated!

#2114623

Shane
Supporter

Languages: English (English )

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

Hello,

Not sure why it's not pulling the accurate information on the first load, however we can workaround this by using the classic views method.

If you go to Toolset -> Views and create a new view. You can add your map and maker to the view. Example below.

[wpv-layout-start]
	[wpv-items-found]
[wpv-map-render map_id="map-24"][/wpv-map-render]
	<!-- wpv-loop-start -->
	<ol class="wpv-loop js-wpv-loop">
		<wpv-loop>
			<li>[wpv-post-body view_template="loop-item-in-classic-view-with-maps"]</li>
          [wpv-map-marker map_id='map-24' marker_id='marker-23' marker_field='wpcf-address'][wpv-post-title][/wpv-map-marker]
		</wpv-loop>
	</ol>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

Notice where i've added the wpv-map-render shortcode as well as the wpv-map-marker shortcode. Doing this then adding this view to your page should make the map work accurately now.

Secondly you can still use the block builder to build out how you want your view to look.

Please let me know if this helps.
Thanks,
Shane

#2114773

Thanks,
I was able to create a map with the correct pins to represent the companies that are below it.
hidden link

Can you please help me add the an interactive search bar that is on this page:
hidden link

I only know how to set up the the search bar to relate to the view output when I'm in Block view.

Switching between classic and block editor has been challenging!

#2114779

I don't see my message asking about the adding the interactive search bar in classic view but I may have given you the the wrong page url. It's hidden link

#2115345

Shane
Supporter

Languages: English (English )

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

Hello,

If you go to your edit view page below.
hidden link

Scroll to the top right hand corner you will see Screen Options. Click this and enable the custom search settings.

Once you've done this the Search and Pagination section will now appear and you can use the New Filter button to add the frontend filters to the view.

Thanks,
Shane

#2115405

Sorry Shane, I didn't see your reply....I'm not sure what happened there. I will try what you suggested above.

#2115581

Shane
Supporter

Languages: English (English )

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

Hello,

Were you successful in creating the search with my advise above ?

#2117677
screenshot-carriercoolingcenter.com-2021.07.17-16_59_24.png

I had some success but I'm still facing challenges. I created a view that shows all the companies which worked for a day, then Toolset deactivated the views plugin. Not sure if that is why the companies are showing but the map is blank.
I deactivated the Blocks plugin and reactivated the views plugin but my map is still black. Not sure if that's the issue, but that is the only change I noticed.
hidden link

#2118909

I had to remove the map from the page since this site is live and the map is not working. It seems better to remove it than have it broken.

#2118919

Here is a page that contains the view with map that is not working now. I'm not sure what's wrong because it WAS working before and now it doesn't show any pins.
hidden link

This could maybe have something to do with Toolset automatically disabling Toolset Views classic?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.