Near Search: How to handle location disambiguation?

This topic contains 12 replies, has 4 voices, and was last updated by  Paolo 10 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #5553

    marco7
    Free User
    Post count: 19

    Example:

    -I look for places near a local tourism region but I get results ordered by the distance from another location 10000 km away (unfortunately another region with the same name in Colombia)

    Is there a way to exclude the unwanted locations from the search results? or override the search by adding the location/region by default?

    I tried the following without success:

    -GD>Multilocations>Location Settings. Enabling selected countries or region

    -GD>Multilocations>Add Edit Location. I created a new location and I called it with the term I wanted to replace in the search.

    Could you please suggest a solution?

    Thanks

    #5554

    Guust
    Moderator
    Post count: 29970

    Have you set “Limit squared distance area to X miles (helps improve search speed)” in GD > General > Search ?
    Can you let us know if that fixed it or not?

    #5555

    marco7
    Free User
    Post count: 19

    Hi Guust,

    Thanks for the quick reply.

    I also tried that and I still have the same problem

    #5556

    Guust
    Moderator
    Post count: 29970

    Mmmm, better pass this one to Vikas.
    While we wait for Vikas, can you post URL and WP admin access details in a private post please?

    #5573

    marco7
    Free User
    Post count: 19
    This reply has been marked as private.
    #5609

    purpleedge
    Expired Member
    Post count: 539

    It used to be that the “Search Near” would order results by distance from the search location, and show the distance – I don’t know if newer version is also meant to filter to the entered location?

    #5741

    Paolo
    Site Admin
    Post count: 31206

    hi,

    results are order by distance from the location entered.

    “Salento Puglia” works, because for Google Maps “Salento” as a tourist region doesn’t exist.

    In fact, if in Google Maps (.it) itself you search for “Salento” it will return as only result a city near Salerno : https://www.google.it/maps/place/84070+Salento+SA/@40.2484681,15.1908607,17z/data=!3m1!4b1!4m2!3m1!1s0x133ead16bb767859:0xf1f18e9e18088b36

    If you use Google Maps .com, it will return a city in Colombia as first result.
    https://www.google.com/maps/place/Salento,+Quindio/@4.594645,-75.51396,12z/data=!3m1!4b1!4m2!3m1!1s0x8e3892bcedc420e5:0x8f81edeeadd699ba

    Only by searching Salento Puglia Google Maps is able to recognize the area, only because there are places with Salento in their name located in that area:

    https://www.google.it/maps/search/salento+puglia/@41.0080599,16.7272393,8z/data=!3m1!4b1

    We would have to ask Google Maps to modify their databases to fix this… 🙁

    Sorry about it,

    #5766

    marco7
    Free User
    Post count: 19
    This reply has been marked as private.
    #5787

    Paolo
    Site Admin
    Post count: 31206

    Hi Marco,

    the reason why it’s returning results from colombia is (probably) because you are using everywhere location.

    In that case the search is performed worldwide.

    Example:

    1 if I search Monument near salento here: http://wpgeo.directory/?geodir_search=1&stype=gd_place&s=monument&snear=salento&sgeo_lat=4.633333299999999&sgeo_lon=-75.56666669999998

    It will give me the same result as in your website.

    But if I select one of the locations (new york for example) before searching, you will get no results found, as it will work as expected.

    Now if you are using country restrictions, it shouldn’t search everywhere in the world, but only in those countries. Ive checked on our demo and unfortunately it doesn’t.

    I’ll refer to Vikas so that he can improve the script.

    Thank you!

    #5850

    marco7
    Free User
    Post count: 19

    Hi Paolo,

    I did solve this little glitch by redirecting the search results, just by using a 302 and a list of common keywords used in the search.

    I’m not a developer and I know you are already very busy working on GD, but I think it would be really good to override google sometimes.

    Something like being able to redirect some search results according to our needs, I’m not asking for a new plugin, I would be happy even with few lines of code.

    For example If I use New York as a location in http://wpgeo.directory/

    I’m looking for a tavern near Canal Street Subway station, so I just write “Tavern” and “Canal Street” OR “Canal St”.

    As result I’m getting one of your test listings Gramercy Tavern, but the distance is calculated from Canal Street in Brattleboro, VT, 160 miles away.

    Thanks for the support,
    Marco

    #5978

    Paolo
    Site Admin
    Post count: 31206

    Hi Marco,

    well that is a bug… GD should add new your to your Near filed query. If you have selected New York as location. I’ll ask Vikas to fix that…

    Thanks for highlighting it.

    #5981

    purpleedge
    Expired Member
    Post count: 539

    Without selecting New York, if you type near “Canal Street, NY” it calculates the distance as 1.48 miles – so I don’t think it is a big bug?

    If geolocation is enabled, how will the search work on a mobile phone? What if I want to know how far the Tavern is from “me”? (Just curious)

    #5985

    Paolo
    Site Admin
    Post count: 31206

    Yes, but after an address or zip that user inputs, it’s not difficult to add the name of the location to the query sent to google API. GeoTheme does something similar and I think both Stiofan and VIkas will agree it’s logical and needed.

    GeoLocation on mobile will still use your IP, we can’t access GPS info that easily without an APP. In major cities IP location on mobile is almost as precise as GPS.

    Thx

Viewing 13 posts - 1 through 13 (of 13 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount