Store Locator Plus® for WordPress Forums Store Locator Plus Prevent center map relocation when no results in SLP

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #58510
    Aleksandar
    Participant

    Hello,

    Plugin environment:

    • Store Locator Plus®:5.0.3
    • Site URL:https://www.marlec.co.uk
    • This Info Cached:1547647283
    • Network Active:No
    • WordPress Version:5.0.3
    • PHP Version:5.6.27
    • MySQL Version:5.5.61
    • PHP Limit:256M
    • WordPress General Limit:64M
    • WordPress Admin Limit:256M
    • PHP Peak RAM:98 MB
    • PHP Post Max Size:108M

     

    Google API keys are generated and added to SLP.

     

    On page https://www.marlec.co.uk/where-to-buy-solar-iboost/ we have customized theme for SLP.  If you search for some UK post code (for example NG1 4FQ or CB3 0GP) you’ll get results from local SLP locations database with listed locations and pins on map, map is centered properly.

    Now, if you search for some keyword that does not exists in local SLP database, for example “Kettering”, then instead of table with locations you’ll get message “No locations found.” which is correct, but you’ll also get map centered to USA within area where Kettering city is located.

    We don’t wish this to happen, but instead simply leave map empty and re-centered to initial canter_map_at location (defined in plugin settings). We do not wish to center map to some location which does not exists in local SLP database.

     

    Please note, if we define “slplus.options.map_region” to be “uk” instead of undefined (we inject that option after SLP is initialized), then in case when keyword does not exists in local SLP database, we get results located around initial center_map_at lat/long, so that feature from Experience addon does not help.

     

    So, is there some setting or option in any of premium addons to prevent re-centering map for non-existing locations and lock it only to local SLP database?

     

    Thank you in advance,

    Aleksandar

    • This topic was modified 5 years, 2 months ago by Aleksandar. Reason: Fix HTML formatting from plugin details
    #58521
    Cici
    Keymaster

    Alex,

    Could you provide me the exact site url where the map loads so I can visualize what you are asking?

    If all your locations are in  UK you can  use the append feature  with experience add-on and it will show the areas only in UK but it will not go back to your center map at.  Once the search has initiated on the site  the google geocoding API kicks in.

    Just using the  Map domain as UK is not going to restrict searches to just that map domain you are correct. That is not how Google works.

    You can help your customers out with experience add-on by providing  the discrete search function

    With Premier there is a limit by territory feature but it does not sound like that  is what you are looking for. There is also a boundary influences guesses, but that will not limit the locations exclusively to the data set to recenter.  Other option is to limit the results radius settings and radius behavior

     

     

     

    #58565
    Aleksandar
    Participant

    Hi Cici,

    I sent message with more detail but that message did not appear here. Can you please check is there some message waiting to be moderated?

    Btw, SLP map is on page https://www.marlec.co.uk/where-to-buy-solar-iboost/

    Thanks,
    Alex

    #58575
    Cici
    Keymaster

    Ok, I did a search on the page you provided a link and using dev tools to inspect site and errors saw this error:

    Uncaught ReferenceError: mtfgf_settings is not defined

    at HTMLDocument.eval (eval at <anonymous> (jquery.js?ver=1.12.4:2), <anonymous>:1052:9)

    at i (jquery.js?ver=1.12.4:2)

    at Object.add [as done] (jquery.js?ver=1.12.4:2)

    at n.fn.init.n.fn.ready (jquery.js?ver=1.12.4:2)

    at a.fn.init.n.fn.init (jquery.js?ver=1.12.4:2)

    at new a.fn.init (jquery-migrate.min.js?ver=1.4.1:2)

    at n (jquery.js?ver=1.12.4:2)

    at HTMLScriptElement.c (main.min.js?ver=1.10.25:1)

    at HTMLScriptElement.dispatch (jquery.js?ver=1.12.4:3)

    at HTMLScriptElement.r.handle (jquery.js?ver=1.12.4:3)

     

    That could be an issue

    #58620
    Aleksandar
    Participant

    Hello Cici,

    I was unable to follow up here in forum last week because forum software complain about missing author name and email address. I hope now it will work and I can send comment.

     

    I was disabled plugin “Magic Tooltips For Gravity Forms” which caused that JS error. Unfortunately, behaviour is same – when “Kattering” keyword is searched and properly returned only message “No locations found”, map is zoomed to Kattering city in US.

    Can you please test again?

    Thanks,

    Alex

    #58636
    Cici
    Keymaster

    Unfortunately, without additional settings such as an append search Goolge is going to return what they think is meant by kettering should be Kettering ohio.

    They need more information  then just a word if there are more then one location in the world that can have a specific search associated with it. They will return the best option in their opinion.  The only work around to what Google is going to guess that we have are search enhancement  option in Premier subscription or the Enterprise level plan in MYSLP.  In MYSLP we can add Kettering to the database with a lat and long to return and it would search the dataset in MYSLP first.

     

    But with the WPSLP free plugin you are at the mercy of google.  If you do not think Append is viable for you, then what about discrete searches?

    I am not trying to sell you something you do not need, but all the plugins that require Google MAPs APIs are limited to what Google will return and a lot of man hours have been put into the addons by developers to try and work around the google limitations and interpretation of what to return with their millions of algorithms which change on a regular basis (see article the developer recently posted about Google  tweaking algorithms and in essence Moving Kansas City..

     

    #58643
    Aleksandar
    Participant

    Hi Cici,

    Thank you very much for detailed response. I’ll summarize to client what options are available, and if client wish to go with some paid addon, they will purchase it.

    I can not remember did this worked same before Google introduced required Maps API or map was intact in case when SLP does not find any match in own locations database.

     

    Wishing you all the best,

    Alex

    #58647
    Cici
    Keymaster

    No idea, but Google has always been constantly changing the algorithms.   Example as explained by the developer, Google moved Kansas City

    #58672
    Cici
    Keymaster

    The developer is also revisiting the function  setting the map domains. He thinks there may have been an error when he fixed the “map region” in a previous version. We need to test the new SLP release and will let you know. If you want to test it (if you have a staging or dev site to test on) we can send you a pre release via email.

    Let us know if you have s somewhere to test the slp 5.0.4.04 beta

     

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.