Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script type="text/javascript" src="cordova.js"></script>
- <script type="text/javascript">
- var map;
- document.addEventListener("deviceready", function() {
- var div = document.getElementById("map_canvas");
- // Initialize the map view
- map = plugin.google.maps.Map.getMap(div);
- // Wait until the map is ready status.
- map.addEventListener(plugin.google.maps.event.MAP_READY, onMapReady);
- }, false);
- function onMapReady() {
- var button = document.getElementById("button");
- button.addEventListener("click", onBtnClicked, false);
- }
- function onBtnClicked() {
- map.showDialog();
- }
- </script>
- </head>
- <body>
- <h3>PhoneGap-GoogleMaps-Plugin</h3>
- <div style="width:100%;height:400px" id="map_canvas"></div>
- <button id="button">Full Screen</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement