Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Supreme › Google Maps Stopped Working
New Landing › How can we help? › Themeforest Theme Support › Supreme › Google Maps Stopped Working
Tagged: added, address, africaalso, cant, coast, google, image, itthanks, map, Maps, marker, puts, remove, stopped, Working, youve
- This topic has 9 replies, 6 voices, and was last updated 10 years by Swift Ideas – Ed.
-
Posted in: Supreme
-
June 28, 2013 at 4:26 pm #9478
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.
June 29, 2013 at 9:13 am #9511This is a known issue and Ed is looking into it, sorry for the inconvenience.
Thanks
BenJune 29, 2013 at 11:55 am #9530To 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
June 29, 2013 at 6:14 pm #9545Hi 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
June 29, 2013 at 6:18 pm #9547hi 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 lineNo clue about all this clearly but trying to help myself – please guide me onto the right track
TaJune 29, 2013 at 6:40 pm #9549Looks like you didn’t replace the original function in functions.php?
You want to replace the whole function that starts on line 891.
– Ed
July 31, 2013 at 10:15 pm #13899I 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 906July 31, 2013 at 10:18 pm #13900THE CORRECT SOLUTION IS PASTE THIS CODE REPLACE UNDER
THE TITLE
/* MAP EMBED FUNCTIONSAugust 6, 2013 at 6:33 pm #14786I 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?
August 7, 2013 at 11:52 am #14892Hi there,
Try adding the following custom css to the box within theme options:
.map-canvas img { max-width: auto; }
– Ed
-
Posted in: Supreme
You must be logged in and have valid license to reply to this topic.