August 23, 201115 yr Can't get my page to even load a basic Google Map. What's the problem? Refuses to work at all. This is running on WAMP. <?php ?><!DOCTYPE html> <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]--> <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]--> <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]--> <!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="author" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="http://localhost/wordpress/wp-content/themes/jetbook2012/favicon.ico"> <link rel="apple-touch-icon" href="http://localhost/wordpress/wp-content/themes/jetbook2012/apple-touch-icon.png"> <link rel="stylesheet" href="http://localhost/wordpress/wp-content/themes/jetbook2012/style.css?v=2"> <link rel="stylesheet" media="handheld" href="http://localhost/wordpress/wp-content/themes/jetbook2012/css/handheld.css?v=2"> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAA-JdX9Fv6Wk9uUih6ek2VXxQZL27VX8iuLzHJhChOMzGM3fr-jxTF0QIpB5FVsSz-sXbiO5zI12krYw" type="text/javascript"></script> <style type="text/css"> html, body, #map_canvas { margin: 0; padding: 0; height: 100%; } </style> <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } </script> </head> <body onload="initialize()"> <div id="container"> <header> <div id="topheader"> <div id="topheaderinner"> <p>0800 **** 538</p> <p>s*** [at] jetbookingdirect.com</p> <form id="searchform" action="http://www.jetbookingdirect.com/" method="get"> <input type="submit" value="Go" id="searchsubmit"/> <input type="text" id="s" name="s" value="" placeholder="Search the site..." /> </form> </div> <div id="contact"> <div id="contactLink">✉ Contact & Search</div> </div> </div> <div id="midheader"> <div id="logo"><a href="http://localhost/wordpress"><img src="http://localhost/wordpress/wp-content/themes/jetbook2012/img/logo.png" alt="a" /></a></div> </div> <nav id="access" role="navigation"> </nav> </header> <div id="topslider"> <div id="pagesliderinner"><div id="slidercontainer"> <h1>Private Jet Charter For You</h1> <h3>Discover the Jet Booking Direct experience</h3> <div id="quoteLink" class="cta">✈ Book a Flight</div> </div></div> </div> <div id="wrapper"> <div id="columnfull"> <section id="columnleft"> <img class="alignleft" src="http://localhost/wordpress/wp-content/uploads/2011/08/success.png"><h2 style="font-size:35px;padding-top:1px;">Success.</h2> <h3>Your flight request has been sent.</h3> <h4>Your name: <?php echo $_POST["name"]; ?></h4> <h4>Your email: <?php echo $_POST["email"]; ?></h4> <h4>Your number: <?php echo $_POST["number"]; ?></h4> <h4>Your flight: <?php echo $_POST["FlightType"]; ?> from <?php echo $_POST["from"]; ?> to <?php echo $_POST["to"]; ?> departing on <?php echo $_POST["depdate"]; ?> at <?php echo $_POST["dephour"]; ?>:<?php echo $_POST["depmin"]; ?><?php $FlightType = $_POST["FlightType"]; if(isset($_GET["FlightType"])) $FlightType = $_GET["FlightType"]; if (!isset($_POST['retdate'])) { $_POST['retdate'] = "undefine"; } if (!isset($_POST['rethour'])) { $_POST['rethour'] = "undefine"; } if (!isset($_POST['retmin'])) { $_POST['retmin'] = "undefine"; } if($FlightType=="Single") { echo '.'; } else if($FlightType=="Return") { echo ', returning on ',$_POST["retdate"], ' at ',$_POST["rethour"],':',$_POST["retmin"],'.'; } else echo 'Multi-Leg.'; ?> </h4> <p>You should receive your quote within 30 minutes during UK office hours.</p> <div id="map_canvas" style="width:100%; height:100%"></div> </section> </body> </html>
August 23, 201115 yr Author I have got this far: http://www.jetbookingdirect.com/wp-content/themes/jetbook2012/quoteresult.php Just can't figure out how to plot the destination to, and a line between the locations. Edited August 23, 201115 yr by brightonmike
August 24, 201115 yr Author Hey...guys...quiet in here! Anyway I've managed to successfully plot the two points on a map. However, I still can't figure out how to do the line. Secondly, the map doesn't center taking both points into account, it centers on the first. Any ideas? BTW this is API v3, not v2, the two are totally different.
Create an account or sign in to comment