title: jQuery-ui-map not displayed when navigating from other html file
body: <p>This is my first question on stackoverflow, so be gentle :) </p>
  
  <p>I'm making a mobile web application with jQuery, jQuery mobile and the jQuery-ui-map plugin. The map works perfectly when I refresh the file where it should be displayed (map.html), but when navigating from index.html it doesn't turn up at all. Console show no erros. I've tried doing a $('#map_canvas').gmap('refresh'); on pageinit, but that doesn't work either. Also that messes up the panning when I refresh the file directly...</p>
  
  <p>I've also tried without the prefetching in the footer menu and with data-rel="external" (that messed up the jquery mobile styling)</p>
  
  <p>Here is the footer navigation from index.html:</p>
  
  <pre><code>     &lt;div data-role="footer" data-theme="a" data-position="fixed"&gt;
          &lt;div data-role="navbar"&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a data-transition="fade" class="txt_footer_href_home ui-btn-active" href="index.html" data-prefetch&gt;Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a data-transition="fade" class="txt_footer_href_offers" href="offers.html" data-prefetch&gt;Offers&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a data-transition="fade" class="txt_footer_href_store" href="store.html" data-prefetch&gt;Store&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a data-transition="fade" class="txt_footer_href_map" href="map.html" data-prefetch&gt;Map&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a data-transition="fade" class="txt_footer_href_more" href="more.html" data-prefetch&gt;...&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;       
         &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And here is the code for the map:</p>
  
  <pre><code>$('#map_canvas').gmap({'maxZoom':17,'center': new google.maps.LatLng(center_latitude,center_longitude),'callback': function() {
      var self = this;
      // Get the current position
      self.getCurrentPosition(function(position, status) {
          // If we got the current position, add the marker
          if ( status === 'OK' ) {
              // Stor current position in a var
              var clientPosition = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
              // Add the current position marker
              self.addMarker({ id:'mark_pos','position': clientPosition, 'bounds': true})
              .click(function() {
                  $('#map_canvas').gmap('openInfoWindow', { 'content': Lang.mapHtml.txt_marker_my_position_content }, this);
              });
              // Paint a blue cirecle where your position is
              self.addShape('Circle', { 
                  'strokeWeight': 0, 
                  'fillColor': "#008595", 
                  'fillOpacity': 0.25, 
                  'center': clientPosition, 
                  'radius': 15, 
                  'clickable': false 
              });
              // Bind direction marker button and show it
              $("#divBtnDirection").show();
              var that = this;
              $("#btn_directions").click(function() {
                  that.displayDirections({ 'origin': clientPosition, 'destination':center_latitude+','+center_longitude , 'travelMode': google.maps.DirectionsTravelMode.DRIVING }, { 'panel': document.getElementById('directions') }, function(result, status) {
                  if ( status === 'OK' ) {
                      $('#map_canvas').gmap('clear', 'markers');
                      $("#divBtnDirection").hide();
                      $("#directions").fadeIn(1000);
  
                  }
              });  
  
              });             
      }
          // Add the shopping centers marker
  
      self.addMarker( { id:'mark_center', 'position': center_latitude+','+center_longitude, 'bounds': true }).click(function() {
                  $('#map_canvas').gmap('openInfoWindow', { 'content': Lang.mapHtml.txt_marker_center_content }, this);
              });
      });   
  
  
  }});
  </code></pre>
  
  <p>The site is currently being displayed <a href="http://www.dogu.no/apps/senterapp/" rel="nofollow">here</a> (its in Norwegian)</p>
  
  <p>Thank you!</p>