Advertisement
Delli

Untitled

Mar 5th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. #map-canvas {
  6. width: 500px;
  7. height: 400px;
  8. }
  9. </style>
  10.  
  11. <head><center>Find your Cinema</center></head>
  12.  
  13.  
  14. Location:
  15. <input type="text" name="location">
  16. <button>Search</button><br><br><br>
  17.  
  18. <div id='infoSummary'>
  19. <!-- Info will come here -->
  20. </div>
  21.  
  22. <div id='infoDetails'>
  23. <!-- Info will come here -->
  24. </div>
  25.  
  26. <!-- In your application, you may want to put the javascript code in a separate file -->
  27. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  28. <script>
  29. serviceLocation = "http://api.worldweatheronline.com/free/v2/weather.ashx";
  30. key = "b052bc3d2dc4decc5b81e8e5ba1f3";
  31.  
  32. //Bulid the components of the request
  33. //(currently I chose some fixed data; but it could be taken from the user via a form)
  34. myQuery = {};
  35. myQuery.format = "json";
  36. myQuery.q = "London";
  37. myQuery.num_of_days = "10";
  38.  
  39. //Build the request to the service: service URL + query string
  40. req = serviceLocation + "?";
  41. $.each(myQuery, function (k, v) {
  42. req += k + '=' + v + '&';
  43. });
  44. //For most APIs, when making calls you will need to add your key to the query string
  45. //(the one you receive after registering to the service)
  46. req += 'key' + '=' + key;
  47.  
  48. $(document).ready(function (){
  49. //The next will be executed when the page has finished loading.
  50. </script>
  51.  
  52. <script type="text/javascript"
  53. src="https://maps.googleapis.com/maps/api/js?sensor=false">
  54. </script>
  55.  
  56. <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=odeon,+london&amp;aq=&amp;sll=53.426328,-3.15254&amp;sspn=0.931206,2.469177&amp;ie=UTF8&amp;hq=odeon&amp;hnear=&amp;t=m&amp;ll=51.481224,-0.100811&amp;spn=0.147155,0.272538&amp;output=embed"></iframe><br /><small><a href="https://www.google.co.uk/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=odeon,+london&amp;aq=&amp;sll=53.426328,-3.15254&amp;sspn=0.931206,2.469177&amp;ie=UTF8&amp;hq=odeon&amp;hnear=&amp;t=m&amp;ll=51.481224,-0.100811&amp;spn=0.147155,0.272538" style="color:#0000FF;text-align:left">View Larger Map</a></small>
  57. <body>
  58. <div id="map-canvas"></div>
  59. </body>
  60.  
  61. </head>
  62. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement