mattsmith Posted January 25, 2017 Report Share Posted January 25, 2017 I am still getting the "oops something went wrong" on my live map after add the api code. <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php /** * STOP! HAMMER TIME! * * ====> READ THIS !!!!! * * I really really, REALLY suggest you don't edit this file. * Why? This is the "main header" file where I put changes for updates. * And you don't want to have to manually go through and figure those out. * * That equals headache for you, and headache for me to figure out what went wrong. * * BUT BUT WAIT, you say... I want to include more javascript, css, etc...! * Well - in your skin's header.tpl file, this file is included as: * * Template::Show('core_htmlhead.tpl'); * * Just add your stuff under that line there. That way, it's in the proper * spot, and this file stays intact for the system (and me) to be able to * make clean updates whenever needed. Less bugs = happy users (and happy me) * * THANKS! */ ?> <script type="text/javascript"> var baseurl = "<?php echo SITE_URL;?>"; </script> <link rel="stylesheet" media="all" type="text/css" href="<?php echo fileurl('lib/css/phpvms.css')?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::Get('PAGE_ENCODING');?>" /> <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBorb_ELH8kXiXxDGpfbz1dgyQk5Gmo7NE&callback=initMap"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery.form.js');?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/phpvms.js');?>"></script> <?php echo $MODULE_HEAD_INC; Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted January 26, 2017 Moderators Report Share Posted January 26, 2017 What is your website url? Quote Link to comment Share on other sites More sharing options...
mattsmith Posted January 26, 2017 Author Report Share Posted January 26, 2017 shoreair.co.uk Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted January 26, 2017 Moderators Report Share Posted January 26, 2017 Ok, you have not edited the correct files so the google maps in your website are not called with the api key you got from google. I do not know where are the google maps includes location but for your frontpage there should be somewhere inside your frontpage_main.tpl/.php file. If you open this file, you will find this: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=true"> </script> You will have to replace it with this: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBorb_ELH8kXiXxDGpfbz1dgyQk5Gmo7NE&libraries=weather&sensor=true"> </script> Could you please check it and let us know how it works? Quote Link to comment Share on other sites More sharing options...
mattsmith Posted January 26, 2017 Author Report Share Posted January 26, 2017 Excellent it works Quote Link to comment Share on other sites More sharing options...
RafaelLetras Posted June 25, 2017 Report Share Posted June 25, 2017 Not working for me :/ Quote Link to comment Share on other sites More sharing options...
RuiMiguel Posted June 25, 2017 Report Share Posted June 25, 2017 hello, You already have the key? ja foste buscar a key a google? Quote Link to comment Share on other sites More sharing options...
Moderators ProSkyDesign Posted June 27, 2017 Moderators Report Share Posted June 27, 2017 On 2017-6-25 at 6:14 AM, RafaelLetras said: Not working for me :/ send me a P.M, I can help you Quote Link to comment Share on other sites More sharing options...
RafaelLetras Posted July 1, 2017 Report Share Posted July 1, 2017 On 27/06/2017 at 10:41 PM, ProSkyDesign said: send me a P.M, I can help you It's working now , thx Quote Link to comment Share on other sites More sharing options...
Ariel Posted July 24, 2017 Report Share Posted July 24, 2017 On 1/26/2017 at 7:18 AM, servetas said: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBorb_ELH8kXiXxDGpfbz1dgyQk5Gmo7NE&libraries=weather&sensor=true"> </script> For future references this seemed to have worked for me. I dont know why the key google was giving was just not working. Thanks Servetas Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.