Ignore:
Timestamp:
Oct 29, 2010, 3:01:40 PM (14 years ago)
Author:
grum
Message:

implement feature:1950

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/js/gmapsCategory.js

    r7453 r7479  
    5151      }
    5252    );
     53    kmlFile.setMap(map);
    5354  }
    5455  else
     
    203204      {
    204205        case 'G':
    205           marker.info.imgTn[index]='./galleries/'.marker.info.imgTn[index].substr(1);
     206          marker.info.imgTn[index]='./galleries/'+marker.info.imgTn[index].substr(1);
    206207          break;
    207208        case 'U':
    208           marker.info.imgTn[index]='./upload/'.marker.info.imgTn[index].substr(1);
     209          marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
    209210          break;
    210211      }
     
    362363    google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
    363364
    364 
    365     if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds)
    366     {
    367       fitToBounds(gmaps.bounds)
    368     }
    369     else
    370     {
    371       gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());
    372     }
    373 
    374365    // reduce copyright size... ^_^
    375366    $('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+' span, #'+gmaps.maps[gmaps.currentMapLoadIndex].id+' a').css('font-size', '55.0%');
    376367
    377     if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null)
    378       gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
     368
     369    if(gmaps.geolocated)
     370    {
     371      if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds)
     372      {
     373        fitToBounds(gmaps.bounds);
     374      }
     375      else
     376      {
     377        gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());
     378      }
     379    }
     380    else
     381    {
     382      fitToBounds(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport());
     383    }
    379384
    380385    google.maps.event.addListener(
     
    406411  if(gmaps.currentMapLoadIndex>-1) loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
    407412}
     413
    408414
    409415$(window).load(function ()
     
    448454      /*
    449455       * initialize map on the server side (call the 'public.maps.init'
    450        * function
     456       * function)
    451457       */
    452458      $.ajax(
     
    484490      ).data('index', i);
    485491
    486       $('div.gmapsPopup div.ui-dialog-titlebar')
    487       .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="fitToBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+
    488               '<span>&there4;</span></a>');
    489       $('#gmapsBoundMap').attr('title', gmaps.lang.boundmap);
     492      if(gmaps.geolocated)
     493      {
     494        $('div.gmapsPopup div.ui-dialog-titlebar')
     495        .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="fitToBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+
     496                '<span>&there4;</span></a>');
     497        $('#gmapsBoundMap').attr('title', gmaps.lang.boundmap);
     498      }
    490499
    491500      if(gmaps.maps[i].gMap.kmlFile!=null)
Note: See TracChangeset for help on using the changeset viewer.