• Resolved Luis Martins

    (@lmartins)


    I’ve configured the business profile and set its coordinates. When I click to see the coordinates on the map they do seem to be correct but on the front-end, the link for getting directions goes way, way off.

    It seems to me it is passing to Google Maps not only the coordinates but the name of the company, which might induce problems.

    The business name for my site is “Francometal”, but when I click to get directions it seems to be getting a similar but different business name.

    You can check the front here:
    https://francometal.webipack.pt/

    On a different suggestion, I think the option to manually drag the pin to set coordinates would be a very helpful option, for the cases where the address doesn’t retrieve the correct exact location.

    https://www.ads-software.com/plugins/business-profile/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi lmartins,

    I was unable to find where the plugin is being used at the link you sent. Can you post a direct link to it? I’ll check it out.

    Thread Starter Luis Martins

    (@lmartins)

    Sorry for the late response.
    The client already has access to the site and probably have removed the link.

    I’ve added it again so that you can check it. It’s the widget at the lower left corner of the site. The link says “Obter direc??es”.

    Tks.

    Hi lmartins,

    It looks like this issue is happening because when the address is concatenated into one string for the URL, the line breaks are getting dropped out without any space to replace them.

    I’ve created an issue so that this is tracked and I can address it with a future release.

    If you want to work around the issue now, you can try adding a space or comma at the end of the each line in the address. This should fix the issue, I think.

    Thread Starter Luis Martins

    (@lmartins)

    Hi Nate,

    Thanks for having a look into this.
    Unfortunately the suggested workaround still doesn’t get me the correct results.

    The preview coordinates gives me this map:
    https://snpy.link/bj22TI

    While the get directions goes to:
    https://snpy.link/DNzdaT

    Please note the URL, as it says “Francoperfil-Comércio+De+Alum%C3%ADnios” and I have no ideia where is getting that info. The company im working with is called “Francometal”, so you can see theres some resemblance but not quite.

    Im guessing Google might be interfering here with some kind of similar results, if that’s the case that’s no good in this scenario, where you can easily send you customer to competitors, and that is the case here.

    Thanks again.

    Hi lmartins,

    It looks like Google just can’t find your address. When I put this address:

    `
    Casal do Bolacha
    Francos
    2635-228 Rio de Mouro
    `

    Into Google Maps, it takes me to the place where your Get Directions link goes to. Unfortunately I’m not aware of a work-around for that. The Get Directions link just passes the address to Google so there’s really nothing we can do here. I’ve even tried passing a lat/lon value but it doesn’t seem to work with the Get Directions system.

    My only recommendation would be to experiment with the address (maybe Google understands your location by a different address) or just don’t show the Get Directions link.

    Thread Starter Luis Martins

    (@lmartins)

    Hey Nate,

    Thank you so much for looking into this.
    I see what you mean. One question though, if the coordinates can’t be used for Get Directions, what are they used for in the plugin?
    The reason im asking this is because when the address goes wrong, for the reasons detailed above, the pin is also misplaced so apparently Google is only considering the address and not the coordinates.

    I did something similar in app I’ve worked before, didn’t used Google Maps back then but Mapbox with Leaflet. When opted for adding an interface where the user could drag the pin to set the coordinates and the Get Directions functionality only considers that, not the address.

    This happens to be useful because the address doesn’t always get a precise location on the map, as it seems to be case here.

    Thanks again.

    Hi lmartins,

    The lat/lon coordinates are used to render the map instead of the address. The coordinates are stored in the database so that Google doesn’t have to perform the transformation from address to lat/lon with every page load (Google Maps API v3 no longer uses addresses to display markers).

    I’d be curious to see how the Get Directions functionality works with coordinates. When I try directly on Google’s site to enter lat/lon coordinates in the directions system it doesn’t work, so if you can get a directions link working with coordinates please show me an example.

    A drag-and-drop feature to correct lat/lon coordinates would be useful. It’s not a high-priority for me at this time, though, so I don’t think it will be implemented soon.

    Thread Starter Luis Martins

    (@lmartins)

    Hi Nate,

    Sure, I get your perspective on this.
    Regarding the directions with coordinates, it wasn’t with the Google Maps API, i’ve done it with Mapbox.

    Closing this as you explained is not in the plans to change the plugin’s behaviour.

    FYI, if you’re able to get a good Get Directions link, you can always add it as a text widget below the contact card widget. Just go to Google Maps, click on directions and see if you can get it to take you to the location.

    If so, send me that link and I can show you how to build a link that goes from the user’s current address to that location.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Link Get Directions still not going for the right location’ is closed to new replies.