Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5.  
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <script type="text/javascript" src="cordova.js"></script>
  8. <script type="text/javascript">
  9. var map;
  10. document.addEventListener("deviceready", function() {
  11. var div = document.getElementById("map_canvas");
  12.  
  13. // Initialize the map view
  14. map = plugin.google.maps.Map.getMap(div);
  15.  
  16. // Wait until the map is ready status.
  17. map.addEventListener(plugin.google.maps.event.MAP_READY, onMapReady);
  18. }, false);
  19.  
  20. function onMapReady() {
  21. var button = document.getElementById("button");
  22. button.addEventListener("click", onBtnClicked, false);
  23. }
  24.  
  25. function onBtnClicked() {
  26. map.showDialog();
  27. }
  28. </script>
  29. </head>
  30. <body>
  31. <h3>PhoneGap-GoogleMaps-Plugin</h3>
  32. <div style="width:100%;height:400px" id="map_canvas"></div>
  33. <button id="button">Full Screen</button>
  34. </body>
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement