Home › Forums › Calendar Products › Events Calendar PRO › URL construction for geolocation/NEAR search/FILTER BAR in the crossfire
- This topic has 6 replies, 3 voices, and was last updated 8 years, 10 months ago by
Cliff.
-
AuthorPosts
-
May 31, 2017 at 6:57 am #1291245
Sam
ParticipantHi – Having visited the TEC-P forum with the subject Search by Location, I have noticed a few things about the link Courtney provided to help out that user. She created the following example off TEC’s test site. In it, the user is able to view the event(s) from the state of Virginia.
Great! That was what I was looking for as well.
However, once one plays around with the filter bar (or actually simply hits the FIND EVENTS button without selecting anything), the result(s) are lost – Virginia is no more.
1) Is this something you know about or are working on? Meanwhile, is there anything we can do to prevent TEC-P from losing this critical user information?
2) And one more very import question…what’s the proper way to construct a URL for doing a search for Virginia, for example (but without long & lat)? I am using a form to accept users’ desired search criteria, and thus can inject a State or zip into a URL to give them their customized TEC-P results page, but can’t find proper URL construction format.
…doesn’t work. Same as Courtney’s above, but I was trying it with the removal of “tribe-bar-geoloc-lat=……..& tribe-bar-geoloc-lng=……..”, but it shows all Events. I obviously don’t have that info from my user’s form.
I only use list (not maps), btw, if that matters.
Thank you kindly!
Sam
June 2, 2017 at 10:29 am #1292521Cliff
MemberHi, Sam.
This is ultimately an issue with our geolocation search… one similar issue that might help you understand how this actually works is when there’s a Birmingham Alabama but also a Birmingham in the UK… if you start typing Birmingham, the autocomplete will need to be used to set the lat/long geolocation parameters to really tell it to search by that instead of by some keyword.
Filter Bar does, however, have location-specific filters that don’t require lat/long: https://cl.ly/203P1M1w2c3W
For example, if you go to http://wpshindig.com/events/list/ and then select “WA” state, you’ll see all events assigned to a Venue in Washington state.
Note that if a venue’s address has a typo, like “WS” instead of “WA”, it likely won’t get geocoded properly (wouldn’t show up when searching by lat/long) and also wouldn’t show up when searching by “WA” state via Filter Bar.
Please let me know if you have any follow-up questions on this topic.
June 2, 2017 at 1:53 pm #1292606Sam
ParticipantCliff – OK. That’s too bad.
I saw TEC-P is using a Google Maps javascript (I’m guessing to pull in the lat & long to make your Maps view work). It seems like a short throw to get location/geo search & filter bar state/city venue pulling from the same location database. Hopefully that’s in the offing.
Just for my own curiosity, where is location/geo search info currently pulling from? For example, when one types PA into location/geo search (and hits enter), the system suggests Panama & Pennsylvania, USA. Where are those suggestions coming from?
And finally, as I’m not a programmer, I’m obviously going to need to hire one to fulfill my original request, which is to find a way to take a form from my site, and return TEC-P results that are category and location-specific (users would be entering state &/or zip code, as well as category interests). Users may then refine their choices from the location/geo search and filter bar afterwards. That’s why I was asking about URL construction, hoping is could be so easy. But it seems not.
Can you offer me any information/advice that may aid in this very important programming request of mine?
Much thanks,
Sam
June 5, 2017 at 4:13 pm #1293464Cliff
MemberI’d suggest using Filter Bar to manually generate some URLs to learn how it does what it does.
PRO’s geolocation code should be here:
- /wp-content/plugins/events-calendar-pro/src/Tribe/Geo_Loc.php
- /wp-content/plugins/events-calendar-pro/src/resources/js/tribe-events-pro.js
If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.
Note that we also have this resource: https://theeventscalendar.com/knowledgebase/creating-custom-filters-for-filter-bar/
There is definitely room for improvement when it comes to mapping, geolocation, etc. I hope you get what you’re after, and we’d love to hear about it!
June 7, 2017 at 5:36 am #1294335Sam
ParticipantThank you, Cliff.
June 7, 2017 at 10:31 am #1294595Cliff
MemberSure thing! Good luck with your project.
-
AuthorPosts
- The topic ‘URL construction for geolocation/NEAR search/FILTER BAR in the crossfire’ is closed to new replies.
