New Landing How can we help? Themeforest Theme Support Supreme Google Maps Stopped Working

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Supreme
  • #9478
    mrl72
    Member
    Post count: 4

    Any address I enter puts the map in the west coast of Africa.

    Also once you’ve added an image marker you can’t remove it.

    Thanks.

    #9511
    Ben – SUPPORT
    Member
    Post count: 690

    This is a known issue and Ed is looking into it, sorry for the inconvenience.

    Thanks
    Ben

    #9530
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    To fix this, open up functions.php and change the function on line 891 with the following:

    function map_embed($address) {
            if (!is_string($address))die("All Addresses must be passed as a string");
    
            $address = str_replace(" ", "+", $address); // replcae all the white space with "+" sign to match with google search pattern
    
            $url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address=$address";
    
            $response = file_get_contents($url);
    
            $json = json_decode($response,TRUE); //generate array object from the response from the web
    
            $_coords['lat'] = $json['results'][0]['geometry']['location']['lat'];
            $_coords['long'] = $json['results'][0]['geometry']['location']['lng'];
    
            return $_coords;
        }
    

    This will be in the next update.

    – Ed

    #9545
    Alouvae
    Member
    Post count: 3

    Hi i have had the same problem i added this code to the function.php file via dreamweaver and in filezilla on line 891 and my site is broken, I am not a developer so please explain how to add this code without breaking the site – i must have done something wrong

    I will try to reset the file back to how it was and await your reply

    Thank you

    Novice

    #9547
    Alouvae
    Member
    Post count: 3

    hi in the code does ‘&address’ mean i should write my domain there?
    also it is on line 892 as when its one line 891 dreamweaver says there is an error i think because there is a { on that line

    No clue about all this clearly but trying to help myself – please guide me onto the right track
    Ta

    #9549
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Looks like you didn’t replace the original function in functions.php?

    You want to replace the whole function that starts on line 891.

    – Ed

    #13899
    carmycurly
    Member
    Post count: 6

    I replace whole function but there are an error
    Fatal error: Cannot redeclare map_embed() (previously declared in /home/sfxavier/public_html/web/wp-content/themes/sfx/functions.php:855) in /home/sfxavier/public_html/web/wp-content/themes/sfx/functions.php on line 906

    #13900
    carmycurly
    Member
    Post count: 6

    THE CORRECT SOLUTION IS PASTE THIS CODE REPLACE UNDER
    THE TITLE
    /* MAP EMBED FUNCTIONS

    #14786
    annschoew
    Member
    Post count: 19

    I was able to get the map to register to the correct address from the information on this thread, but now the navigation arrows are not working properly. If I set the map for 400pixles, the up and down arrows disappear. If i set the map for 300pixles, the circular icon of arrow disappear.

    What can I do to change this?

    #14892
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    Try adding the following custom css to the box within theme options:

    .map-canvas img {
    max-width: auto;
    }
    

    – Ed

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register