jquery google maps api v3 load issue
Ok so this i my first attempt at a mobile app and im having an issue with my google maps.
I am using dreamweaver cs6 with phonegap build service to compile my app my coding is as follows
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>jQuery Mobile Web App</title><link href="jquery-mobile/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css"/>
- <style type="text/css">
- h1,h2,h3,h4,h5,h6 {
- font-family: cursive, fantasy;
- color: #996600;
- border-top-color: #000;
- border-right-color: #000;
- border-bottom-color: #000;
- border-left-color: #000;
- font-style: italic;
- font-size: xx-large;
- text-align: center;
- }
- </style>
- <link href="css/flexslider.css" rel="stylesheet" type="text/css">
- <script src="jquery-mobile/jquery-1.6.4.min.js" type="text/javascript"></script>
- <script src="jquery-mobile/jquery.mobile-1.0.min.js" type="text/javascript"></script>
- <script src="includes/jquery-1.4.2.js" type="text/javascript"></script>
- <script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
- <script src="js/jquery.flexslider-min.js" type="text/javascript"></script>
- <script type="text/xml">
- <!--
- <oa:widgets>
- <oa:widget wid="2827522" binding="#OAWidget" />
- </oa:widgets>
- -->
- </script>
- </head>
- <body class="googlemap">
- <div id="page" data-role="page" data-theme="a">
- <div data-role="content">
- <h1><img src="jquery-mobile/AQUAE SULIS LOGO.jpg" alt="AQUAE SULIS" width="369" height="188" class="ui-header">
- </h1>
- </div>
- <div data-role="content">
- <div data-role="controlgroup" data-type="vertical">
-
- <div data-role="controlgroup">
-
- <a href=#page2 data-icon="forward" data-role="button" data-theme="a"><font color=#996600>Menu</font color></a>
-
- <a href="https://app.secure-booker.com/Mobile/aquaesulis?" class="flip" data-icon="forward" data-role="button"><font color=#996600>Book Appointment</font color></a>
-
- <a href="#page4" data-icon="forward" data-role="button"><font color=#996600>Directions</font color></a>
- </div>
- </div>
- <a href="http://facebook.com/aquaesulissalonandspa"><center><img src="images/Facebook.jpg" width="51" height="50"></center></a>
- </div>
- <div data-role="footer" data-theme="a">
-
- <h4><center>(435) 767-8323 </center></h4>
- </div>
- </div>
- <div data-role="page" id="page2">
- <div data-role="header">
- <h1>Menu</h1>
- </div>
- <div data-role="content">
- <script type="text/javascript">
- // BeginOAWidget_Instance_2827522: #OAWidget
- $(window).load(function() {
- $('.flexslider').flexslider({
- animation: "fade",
- controlsContainer: ".flex-container", //Selector: Declare which container the navigation elements should be appended too. Default container is the flexSlider element. If the given element is not found, the default action will be taken.
- slideDirection: "horizontal", //String: Select the sliding direction, 'horizontal' or 'vertical'
- slideshow: false, //Boolean: Animate slider automatically
- slideshowSpeed: 5000, //Integer: Set the speed of the slideshow cycling, in milliseconds
- animationDuration: 550, //Integer: Set the speed of animations, in milliseconds
- directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
- controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
- keyboardNav: true, //Boolean: Allow slider navigating via keyboard left/right keys
- mousewheel: false, //Boolean: Allow slider navigating via mousewheel
- prevText: "Previous", //String: Set the text for the "previous" directionNav item
- nextText: "Next", //String: Set the text for the "next" directionNav item
- pausePlay: false, //Boolean: Create pause/play dynamic element
- pauseText: "Pause", //String: Set the text for the "pause" pausePlay item
- playText: "Play", //String: Set the text for the "play" pausePlay item
- randomize: false, //Boolean: Randomize slide order
- slideToStart: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
- animationLoop: false, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
- pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
- pauseOnHover: true, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
- manualControls: "", //Selector: Declare custom control navigation. Example would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
- start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
- before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
- after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
- end: function(){} //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
-
- });
- });
- // EndOAWidget_Instance_2827522
- </script>
-
- <!--=============================
- Markup for FADE animation
- =================================-->
- <div class="flex-container">
- <div class="flexslider">
- <ul class="slides">
- <li> <img src="Salon Menu Page One.jpg" />
- </li>
- <li><img src="IMG_4356.JPG" /></a>
- </li>
- <li> <img src="IMG_4356a.jpg" /> </li>
- <li> <img src="IMG_4356b.jpg" /> </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div data-role="footer">
- <h4>Page Footer</h4>
- </div>
- </div>
- </div>
- <div data-role="page" id="page4">
- <div data-role="header">
- <h1>Directions</h1>
- </div>
-
- <!DOCTYPE html>
- <html>
- <head>
- <script
- src="http://maps.googleapis.com/maps/api/js?key= &sensor=true">
- </script>
- <script>
- var myCenter=new google.maps.LatLng(37.12516,-113.614678);
- function initialize()
- {
- var mapProp = {
- center:myCenter,
- zoom:15,
- mapTypeId:google.maps.MapTypeId.ROADMAP
- };
- var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
- var marker=new google.maps.Marker({
- position:myCenter,
- animation:google.maps.Animation.BOUNCE
- });
- marker.setMap(map);
- var infowindow = new google.maps.InfoWindow({
- content:"Aquae Sulis Salon And Spa <br> 992 n. Westridge Dr. Saint George,UT 84770"
- });
- google.maps.event.addListener(marker, 'click', function() {
- infowindow.open(map,marker);
- });
- }
-
- google.maps.event.addDomListener(window, 'load', initialize);
- </script>
- <body>
- <div id="googleMap" style="width: ; height: 300px; resize: both;"></div>
- </body>
- </html>
- <div data-role="footer">
- <h4><center>(435) 767-8323 </h4>
- </div></center>
- </div>
- </body>
- </html>
now my problem is that when i build the app and test on droid the map only loads about 1/4 of the map and stops?
if I switch to landscape view the map loads fully and i can go back to portrait view still with a full map
it does not have this problem when I view the app in live view on dreamweaver though. what is happening?