Skip Navigation

[Resolved] jamal please

This support ticket is created 4 years, 1 month 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 14 replies, has 4 voices.

Last updated by martinP-13 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1730733

ref this ticket (which is closed) https://toolset.com/forums/topic/distance-filter-for-post-with-latitude-and-longitude-custom-fields/

i now have my venues set up to use a toolset map , i had to re input adresses for 357 venues but this will also sort the original ticket (related veunes and organiser , which is working spot on both ways around massive thanks on your help with that)

so to complete my whole maps project i have 2 small issues.

issue 1 , as i have different markers is there a way to set the home marker to be infornt of the other markers ? (maybe a targeted css z-index?) (this is least important )

issue 2 : my single-trial-venues i have the toolset map displaying its locations using the address field no problems here (related organizer fully working too as i basically copied what you did for me the other way around) , when i set up my view to list ALL VENUES on a single map (here hidden link) it is showing all my venues correctly .
i cannot how ever still set a distance filter up (all venues not yet got adresses) i use this view but i have no querries or filters i deleted them all to start again. all i need is for the page to auto grab users location ( i use https so ok there ) and user to be able to then search within a radius ,i want to use ajax so no submit is used. i am using this view hidden link . each time i try it desnt work for some strange reason.

toolset adress field is hidden link

#1731157

Shane
Supporter

Languages: English (English )

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

Hi Martin,

Jamal is currently unavailable today but will be back next week in order to continue assisting you with this ticket. For now I've assigned this ticket to him so that he can handle it when he gets in.

Thanks,
Shane

#1731429

thankyou

#1733695

when i try to set up distance filtering querry (using user location ) most of the venues disapear , if i delete the querry then all venues return but i cant querry from the user location #? its bizzare?

#1734165

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Martin,

I would like to take a closer look at the view to understand how you have implemented the new address field but for security reasons, the credentials were removed from your previous tickets after they were resolved. Please enter the credentials again on this ticket and let me take a closer look at it. Your next reply will be private to let you share credentials safely.
** Make a database backup before sharing credentials. **

#1738637

hi jamal , sorry for late response i managed to do a lot of this myself.

im almost done with these pessky maps now . i basically have 4 maps on 4 post types

1 hidden link click on a marker on this map it will give the id of all related club , it works fine , but how can i translate thise id to post title with link

hidden link this ialmost done , if i remove the distance queery all clubs are displayed , if i add a distance queery of 500 miles then some clubs disapear even though they are within 500 miles. also is there a way for the page to get the adress rather than the user clicking use my location . and finally if you click on any marker

3 a single club page hidden link working well , maybe i will same solution to number 4 .....

4 a single venue page hidden link works very well , but you will notice the home marker gets lost , how can i have this at the fron of the view so the relaated items are behind the home marker ,ie like a z-index

thanks for all your help implementing this i know you have gone way above and beyond and it is really appreciated.
i have made a backup

kind regards
martin

#1738909

sorry i forgot to add login credentials

#1740217

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Martin, I activate the private reply. You can share credentials safely.

I'll then look into these problems. Just remember that the distance filter will only work for addresses that are managed by Toolset Maps. The addresses(latitude, longitude) from the Events plugin cannot be filtered by distance.

#1740351

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

1 hidden link click on a marker on this map it will give the id of all related club , it works fine , but how can i translate thise id to post title with link
From what I gathered so far, you are returning the IDs of the related clubs using a custom shortcode

[related_orgs]

This shortcode returns the IDs wrapped in a <h4> tag. Check the code of the shortcode to be sure.
You will need to modify this shortcode or create another shortcode that will return the IDs separated by comma(,) and NOT wrapped in any HTML tag. Then you can use in a view as we did in the previous ticket and pass the IDs in a shortcode argument, then you can use Toolset shortcodes inside the view to return the title with a link:

[wpv-view name="your-new-view-to-display-clubs" ids=[your-shortcode-to-return-IDs-separated-by-comma]]

Let me know if this method is not yet clear for you.

2 hidden link this ialmost done , if i remove the distance queery all clubs are displayed , if i add a distance queery of 500 miles then some clubs disapear even though they are within 500 miles. also is there a way for the page to get the adress rather than the user clicking use my location . and finally if you click on any marker
Can you give an example of a club that disappears that's should not? I'll investigate why, probably in a separate ticket.
You can enter the address of the center that you want to calculate the distance from. Check this screenshot hidden link
You can't currently click on a marker and use it as the center of the distance filter. If you believe this feature should be added to Toolset, let me know and I'll ask for a new feature.

3 a single club page hidden link working well , maybe i will same solution to number 4 .....
4 a single venue page hidden link works very well , but you will notice the home marker gets lost , how can i have this at the fron of the view so the relaated items are behind the home marker ,ie like a z-index
I believe "z-index" can help here, but, it seems that the Google Maps Javascript API overrides that. I was not able to make the marker appear in front by manually increasing its z-index in the browser developers' tools. This will need some advanced Javascript skills, which I am afraid I don't have. If you believe this should be added as a new feature to maps let me know and I'll escalate it.

However, for support rules, we are able to handle only one issue at the time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have to kindly ask you to open a new thread for any other question that you want to discuss further.

I'll be on vacation next week, but the whole team will be at your service 🙂

#1740373

thankyou jamal , if we concentrate on no.2 that will be fine 1,,3,4 you basically confirmed what i allready thought i can live with these as they are.

hidden link
hidden link

if distance filter active. 37 clubs found
if no distance filter active 143 clubs found this is correct

filter im using
[wpv-control-distance distance_unit_url_param="toolset_maps_distance_unit" distance_radius_url_param="toolset_maps_distance_radius" distance_center_url_param="toolset_maps_distance_center" compare_field="toolmap" default_distance="500" default_unit="mi"]

club list is here hidden link
all use the adress field toolmap and are completed.

there is currently no filter aet on this and the required info to get users adress anf filter distance within 500miles would go here
line 4 .......... [wpv-filter-controls] <div class="centerme">\\\\\\\\\\\.FILTER HERE.///////////// </div>

thanks jamal , hopefully this is an easy fix and i will be done with maps...

#1740429

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I'll disable AJAX on the view to check how it performs and to be able to debug it, then I'll see how we can check the other sorting criteria while on AJAX.

I'll get back to you as soon as possible.

#1740459

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Without the distance filter: 143 results.
With the distance filter on 499 miles: 82 results.
The underlying SQL query:

SELECT   wp_hwta_posts.* FROM wp_hwta_posts 
INNER JOIN wp_hwta_postmeta AS tmapsmeta ON ( wp_hwta_posts.ID = tmapsmeta.post_id )
INNER JOIN wp_hwta_toolset_maps_address_cache ON wp_hwta_toolset_maps_address_cache.address_passed = tmapsmeta.meta_value
 WHERE 1=1  AND wp_hwta_posts.ID NOT IN (7006) AND wp_hwta_posts.post_type = 'tribe_organizer' AND ((wp_hwta_posts.post_status = 'publish' OR wp_hwta_posts.post_status = 'private')) GROUP BY wp_hwta_posts.ID ORDER BY wp_hwta_posts.post_title ASC 

I suspect that the missing 61locations, do not have a cached location in the toolset_maps_address_cache database table. Check the above SQL query, it uses that table.
To overcome this, you will have to delete the Toolset maps cache in Toolset->Settings->Maps, then create a view to display all places on a map paginated by 10, and visit all pages. This is useful to make sure you will not reach the Google Maps API limit. And this will force Toolset to enter the new values in the cache table.

Then I tried to search within 199km from "Aberdeen, Scotland" and I only got 8 results, which seems correct. I searched the distance between Aberdeen(in the top north) and Southhampton(in the top south) and it is within the 500Miles range. This means, that it is expected to have all the results within the UK in 500Miles radius. Maybe I am mistaken, I never been to the UK :-). Please correct me if I am wrong, and, provide an example that demonstrates the problem:
- Select...
- Select...
- We expect ...
- Instead, we got ...

Once we get this working without AJAX, we'll check with AJAX enabled.

#1741099

thanks jamal i got all that sorted , when i tun ajax on it does not filter the results .
thanks jamal ,

#1743123

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Jamal is on Vacation. This is Minesh here and I'll take care of this ticket.

If everything is sorted, please feel free to mark resolve the ticket.

#1745381

My issue is resolved now. Thank you!

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