Changeset 15208


Ignore:
Timestamp:
06/06/13 20:22:02 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: better consistency with bottom

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/googlemaps.m

    r15207 r15208  
    6262        zoom = getfieldvalue(options,'zoom');
    6363else
    64         zoom    = optimalzoom(ullat,ullon,lrlat,lrlon);
     64        zoom    = 11;%ptimalzoom(ullat,ullon,lrlat,lrlon);
    6565        display(['googlemaps info: default zoom level ' num2str(zoom)]);
    6666end
    6767scale   = 1;
    6868maxsize = 640;
     69bottom  = 120;
    6970
    7071%convert all these coordinates to pixels
     
    7879%calculate rows and columns
    7980cols = ceil(dx/maxsize);
    80 rows = ceil(dy/maxsize);
     81rows = ceil(dy/(maxsize-bottom));
    8182
    8283%calculate pixel dimensions of each small image
    83 bottom = 120;
    8484width   = ceil(dx/cols);
    8585height  = ceil(dy/rows);
     
    9090for x=0:cols-1,
    9191        for y=0:rows-1,
    92                 dxn = width * (0.5 + x);
     92                dxn = width  * (0.5 + x);
    9393                dyn = height * (0.5 + y);
    9494                [latn, lonn] = pixelstolatlon(ulx + dxn, uly - dyn - bottom/2, zoom);
     
    109109                indx2 = min(floor(dx),floor(x*width)+size(X,2));
    110110                indy1 = floor(y*height)+1;
    111                 [floor(dy),floor(y*height)+size(X,1)]
    112                 [height heightplus]
    113111                indy2 = min(floor(dy),floor(y*height)+size(X,1));
    114112                final(indy1:indy2,indx1:indx2,:)=X(1:indy2-indy1+1,1:indx2-indx1+1,:);
Note: See TracChangeset for help on using the changeset viewer.