Wrong place after search
-
Hi! I don’t no why, but I’ve created a store that show in the right place, but when I search for the city “Mauá” is not pointing to the city “Mauá”, the search is going to city “Visconde de Mauá”.
I see that is a issue in the search, not from the store info, because when you put “Cidade”(is the word city in Brazilian Portuguese) before “Mauá” in the search, the location goes to the right location.
If you guys try here: https://mineirodelivery.com.br/unidades/ you will see this.
Try put “Mauá” and “Cidade Mauá”. It is the same place, but shows two different places.The page I need help with: [log in to see the link]
-
Hi there!
Um, not very sure why that is happening, but here’s what you can try.
In wp store locator settings, near the end, there is a buton labeled “Input location details”. Here, you can try both strings: “Mauá” and “Cidade Mauá” and compare the results (see screenshot for reference).
You can even see the Google Geocode API response in JSON format in the “API Response” tab and compare both searches. If you find anything relevant here, share it with us here as well and we will try to draw some conclusions from there.
Let us know.
Regards,Thanks Farroyo, but I still don’t know what’s happening.
When I put “Mauá” in API Response, it’s shows:
[ { "address_components": [ { "long_name": "Pedra Selada", "short_name": "Pedra Selada", "types": [ "administrative_area_level_4", "political" ] }, { "long_name": "Resende", "short_name": "Resende", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "Rio de Janeiro", "short_name": "RJ", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "Brasil", "short_name": "BR", "types": [ "country", "political" ] }, { "long_name": "27553-000", "short_name": "27553-000", "types": [ "postal_code" ] } ], "formatted_address": "RJ 151- KM 8,5 - Pedra Selada, Resende - RJ, 27553-000, Brasil", "geometry": { "location": { "lat": -22.3176374, "lng": -44.512732 }, "location_type": "GEOMETRIC_CENTER", "viewport": { "south": -22.3189489802915, "west": -44.5140815802915, "north": -22.3162510197085, "east": -44.5113836197085 } }, "partial_match": true, "place_id": "ChIJ08ssJKtlngARiNOTQjsUj98", "plus_code": { "compound_code": "MFJP+WW Visconde de Mauá - Pedra Selada, Resende - RJ", "global_code": "589QMFJP+WW" }, "types": [ "establishment", "lodging", "point_of_interest" ] } ]
And when I put “Cidade Mauá” it’s shows:
[ { "address_components": [ { "long_name": "Mauá", "short_name": "Mauá", "types": [ "locality", "political" ] }, { "long_name": "Mauá", "short_name": "Mauá", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "São Paulo", "short_name": "SP", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "Brasil", "short_name": "BR", "types": [ "country", "political" ] } ], "formatted_address": "Mauá, SP, Brasil", "geometry": { "bounds": { "south": -23.7210179, "west": -46.4986089, "north": -23.6120573, "east": -46.3832768 }, "location": { "lat": -23.666558, "lng": -46.4599145 }, "location_type": "APPROXIMATE", "viewport": { "south": -23.7210179, "west": -46.4986089, "north": -23.6120573, "east": -46.3832768 } }, "place_id": "ChIJP-RInlRpzpQR34j8aHpiEOI", "types": [ "locality", "political" ] } ]
Its very weird why this is happening.
Hi again, and sorry for the delay!!
I was doing some tests in my dev server, and I have gotten these results when performing both searches.
This is the results for “Mauá”:
[ { "address_components": [ { "long_name": "Mauá", "short_name": "Mauá", "types": [ "locality", "political" ] }, { "long_name": "Mauá", "short_name": "Mauá", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "State of São Paulo", "short_name": "SP", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "Brazil", "short_name": "BR", "types": [ "country", "political" ] } ], "formatted_address": "Mauá, State of São Paulo, Brazil", "geometry": { "bounds": { "south": -23.7210179, "west": -46.4986089, "north": -23.6120573, "east": -46.3832768 }, "location": { "lat": -23.666558, "lng": -46.4599145 }, "location_type": "APPROXIMATE", "viewport": { "south": -23.7210179, "west": -46.4986089, "north": -23.6120573, "east": -46.3832768 } }, "place_id": "ChIJP-RInlRpzpQR34j8aHpiEOI", "types": [ "locality", "political" ] } ]
And this is the result for “Cidade Mauá”:
[ { "address_components": [ { "long_name": "Mauá", "short_name": "Mauá", "types": [ "locality", "political" ] }, { "long_name": "Mauá", "short_name": "Mauá", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "State of São Paulo", "short_name": "SP", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "Brazil", "short_name": "BR", "types": [ "country", "political" ] } ], "formatted_address": "Mauá, State of São Paulo, Brazil", "geometry": { "bounds": { "south": -23.7210179, "west": -46.4986089, "north": -23.6120573, "east": -46.3832768 }, "location": { "lat": -23.666558, "lng": -46.4599145 }, "location_type": "APPROXIMATE", "viewport": { "south": -23.7210179, "west": -46.4986089, "north": -23.6120573, "east": -46.3832768 } }, "place_id": "ChIJP-RInlRpzpQR34j8aHpiEOI", "types": [ "locality", "political" ] } ]
As you can see, same coordinates, same place. So there must be something wrong in your configuration. One of the most common causes for this is the “Map Region” dropdown and especially the “Restrict the geocoding results to the selected map region?” checkbox (see screenshot).
Maybe you don’t have these restrictions in place and that is why Google Maps is getting a bit confused when doing a much broader search.
Please give it a try and get back to us if that does not solve things for you.
Regards,
- This reply was modified 2 years, 5 months ago by farroyo.
- The topic ‘Wrong place after search’ is closed to new replies.