Support

Account

Home Forums Front-end Issues Google Maps

Solving

Google Maps

  • Hi,

    I noticed that whenever I put in a partial address (so no street, just a town or something) Google Maps add-on shows a totally different place.

    Map shows perfectly when you add a complete address.

    Any idea if this can be solved?

    Cheers Joost

  • Hi @joostvaessen

    This may be a limitation of the google map API.

    Can you please provide some data to test with?

    Thanks
    E

  • Hi Elliot,

    for example: when I want to have a map for “roermond, netherlands”.
    It shows me Coffeyville.

    Looks like that when the address I enter only contains 2 parts, instead of 3 (city, street, country) the Google Maps shows this Coffeyville place.

    If you need any credentials to log in i’m happy to provide them by email.

    Thanks
    Joost

  • Hi @joostvaessen

    i just entered roermond, netherlands and hit enter and got the follow correct result. I can’t explain why your google maps field is not working correctly, is it possible that you selected a result from the dropdown list? Or hit the ‘find my location’ button?

    Thanks
    E

  • No it’s not any of your suggestions.

    Funny thing is that on the dashboard (back-end) it shows the map fine. On the frontside it shows a totally different map, while if you put the full address also the front side is fine.

    I’ve added 2 screenshots to show you back- and frontside.

    Maybe this helps…

    Cheers Joost

  • If the issue is only on the front end, the issue is definitely with your code.

    What code are you using to render the map? Have you checked for JS errors on the page?

    Thanks
    E

  • Hi Elliot,

    i’m using this code at the moment.

    <?php if(get_field('maps'))
    	{
    		?>
            <iframe width="550" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=<?php echo the_field('maps'); ?>;t=m&z=10&iwloc=A&output=embed&iwloc=near"></iframe>
            <?php
    	}
    	?>

    There are no specific JS errors on the page.

    Joost

  • Hi @joostvaessen

    I think you should review the page source of your website. I can assure you that the code above will not work as expected. please read the documentation to see how to correctly use the google maps field.

    Thanks
    E

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

The topic ‘Google Maps’ is closed to new replies.