Store Locator Plus® for WordPress › Forums › Store Locator Plus › directory listing with location sensor not working
- This topic has 2 replies, 3 voices, and was last updated 6 years, 10 months ago by Lance Cleveland.
-
AuthorPosts
-
January 10, 2018 at 7:01 PM #55816MaikelParticipant
Hi again,
I’ve tried to get the following done multiple times, but even with all the support I’ve got so far, I still can’t get it to work. Maybe I forgot to mention some details, but I’ll try to explain again (I’ve got Power and Experience add-on and everything is updated to the latest version):
I’v got two pages on one website where I want store locator plus to show results:
– on the first page (locations) I want to display a map where the 5 nearest locations of my client are presented to the visitor with a listing beneath it. And that’s working fine now, after the update to 4.9.3. So part one is working nicely.
– on the second page I want to get a directory listing or a listing without the map (whatever works best). slp_directory gives me a listing of all the locations but doesn’t pick up on the location sensor, so it only shows the complete list, not only the 5 nearest to the visitor of the site.
When I try to get a similar result with the ‘hide_map’ function (and the normal SLPLUS shortcode, it doesn’t hide the map (and the search field) at all.
Part of the problem is that I have to achieve this using a shortcode, since on the other page I do want to display the map, search field and the 5 nearest results and those settings are all good for that page.
So, for example:
In the netherlands, my client has 33 locations.
A visitor of the site lives in amsterdam and visits the store locator.
He arrives at the site and gets a directory listing (which shows the 5 nearest locations):
This is what I want as a result:
– location amsterdam
– location rotterdam
– location zaandam
– location The Hague
– Location Utrecht(or the normal listing, but without the map)
So, it must not show all the 33 locations, but only the 5 nearest to him.
So, indeed, NO map, NO search field, nothing besides a (bullited) list.In ‘map’-modus it works fine, but in the directory listing it does not.
Thanks in advance!
Cheers,
MaikelJanuary 11, 2018 at 11:13 AM #55819CiciKeymasterMikael, Could you provide the site url, both pages that you are using Store locator Plus on?
January 11, 2018 at 12:07 PM #55821Lance ClevelandKeymasterThe directory listing does not work that way.
If you need to add additional parameters to your directory output to limit it to X locations and/or auto-detect the users location while in DIRECTORY mode it will require custom coding.
The location sensor is a Google Maps specific thing that requires the map to be active, present, and displayed to grab a user’s location data. It also requires you are on an HTTPS site and the user has allowed the data to be sent. If you have a page with no map displayed it will not work.
The directory builder, is NOT tied directly to the Google Maps interface. It uses the Store Locator Plus location database to build the lists. It does NOT talk to Google Maps at all. Therefore it has no way to detect the user location.
We could probably create a non-Google Maps solution for this but that will require customization. If you would like us to quote a time estimate we can do that but be aware customization purchases are only available to Premier members. All customization work is at least 1 code-day at $500 , something like this is probably in a 3-4 day range. We won’t know until we research this in more detail.
-
AuthorPosts
- You must be logged in to reply to this topic.