Store Locator Plus® for WordPress › Forums › Store Locator Plus › Prevent map from re-positioning if no results found
- This topic has 8 replies, 2 voices, and was last updated 5 years, 1 month ago by Cici.
-
AuthorPosts
-
September 5, 2019 at 3:35 PM #65986JackieParticipant
I found this topic from earlier this year (https://wp.storelocatorplus.com/forums/topic/prevent-center-map-relocation-when-no-results-in-slp/) but it didn’t appear to reach a conclusion. I’m wondering if there have been any updates since then that will now allow this to work.
Basically what we need is when there are no results returned, the map will go back to (or stay at) the initial position. Any search outside of the US currently will center over that area (London, England for example) but there are no stores there, so we don’t want it to re-position to that location. I’ve tried just about every setting I could find and I have not been able to get this to work.
Plugin Environment:
Store Locator Plus®:5.2.8
Experience:5.2.5
Power:5.2.5
Premier:5.1
Site URL:https://eltamddev.wpengine.com
This Info Cached:1567711726
Network Active:No
WordPress Version:5.1.1
PHP Version:7.2.20-2+ubuntu18.04.1+deb.sury.org+1
MySQL Version:5.7.26
PHP Limit:512M
WordPress General Limit:40M
WordPress Admin Limit:512M
PHP Peak RAM:10 MB
PHP Post Max Size:100M- This topic was modified 5 years, 2 months ago by Jackie.
September 7, 2019 at 12:06 PM #66108CiciKeymasterThat isn’t the way the Google API Map and SLP work. (How search and radius work) It will always go to the destination searched unless you have a discrete filter or append to stay in just one country.. The other forum question , the answer was this:
Once the search has initiated on the site the google geocoding API kicks in.
There may be a way for you to write some special code but it is not something we can do within the self managed WPSLP free plugin and still have it communicate and use the google MAP API. You can add shortcodes viA the add-ons if you want it to only search in one country for instance or only within x radius etcYou can hide the map entirely with Experience add-on, or have a discrete search or a dropdown of countries or cities where your locations do exist. That way your customers will not be searching all over the world and your Google MAP views will not be pinged every time they do perform a search just to be told No locations found…it might help you and the customers if you showed thrm a list of the areas that do have locations. But that is totally up to you.
The feature you are inquiring about does not exist within our plugin
- This reply was modified 5 years, 2 months ago by Cici.
September 9, 2019 at 2:14 PM #66200JackieParticipantI have already attempted to use the append feature and discrete filters to stay in the United States and it just does not work if someone puts in a location outside of the US. I know there are other Store Locator plugins where this feature is available, so it looks like we may end up having to find a new plugin.
September 11, 2019 at 12:25 PM #66307CiciKeymasterWhen using the append did you use the shortcode only_with> and under results/settings change the after start up miles to a lower number. Change the default radius to a lower number as well
For instance I have a page for Costa rica, Because Google is U.S centric the search for anything in Dan Jose would always go to calif.
I added this shortcode on my page and now it always searches only that country on that page
[SLPLUS map_region=’cr’ center_map_at=”San Jose, Costa Rica” initial_radius=’1000′ append_to_search=’Costa Rica’]
September 11, 2019 at 12:27 PM #66308CiciKeymasterMore shortcodes
https://docs.storelocatorplus.com/blog/slplus-shortcode-options/
September 11, 2019 at 12:49 PM #66316CiciKeymasterI am trying to folow the stgeps you are taking, when you say you have tried everything. I need to be able to explain it to the developer. Also if you have Premier there are more options. Also make sure you have flushed your cacheing
The site url you provided does not leave the country if I search for outside of the U.S. t when I searched for London I only see the center of the US I do not see a different map load and could not locate addressSeptember 12, 2019 at 3:42 PM #66374JackieParticipantI’ve tried what you suggested. If you put in “London, England” and not just “London” it does center on London. If you enter “Hong Kong” it centers there as well, for example. I do have premier and I’ve gone through those settings as well.
September 20, 2019 at 1:41 PM #66760JackieParticipantJust an update to say we were able to create a custom solution and stay with the plugin.
September 20, 2019 at 2:15 PM #66762 -
AuthorPosts
- You must be logged in to reply to this topic.