Changeset 15208
- Timestamp:
- 06/06/13 20:22:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/googlemaps.m
r15207 r15208 62 62 zoom = getfieldvalue(options,'zoom'); 63 63 else 64 zoom = optimalzoom(ullat,ullon,lrlat,lrlon);64 zoom = 11;%ptimalzoom(ullat,ullon,lrlat,lrlon); 65 65 display(['googlemaps info: default zoom level ' num2str(zoom)]); 66 66 end 67 67 scale = 1; 68 68 maxsize = 640; 69 bottom = 120; 69 70 70 71 %convert all these coordinates to pixels … … 78 79 %calculate rows and columns 79 80 cols = ceil(dx/maxsize); 80 rows = ceil(dy/ maxsize);81 rows = ceil(dy/(maxsize-bottom)); 81 82 82 83 %calculate pixel dimensions of each small image 83 bottom = 120;84 84 width = ceil(dx/cols); 85 85 height = ceil(dy/rows); … … 90 90 for x=0:cols-1, 91 91 for y=0:rows-1, 92 dxn = width * (0.5 + x);92 dxn = width * (0.5 + x); 93 93 dyn = height * (0.5 + y); 94 94 [latn, lonn] = pixelstolatlon(ulx + dxn, uly - dyn - bottom/2, zoom); … … 109 109 indx2 = min(floor(dx),floor(x*width)+size(X,2)); 110 110 indy1 = floor(y*height)+1; 111 [floor(dy),floor(y*height)+size(X,1)]112 [height heightplus]113 111 indy2 = min(floor(dy),floor(y*height)+size(X,1)); 114 112 final(indy1:indy2,indx1:indx2,:)=X(1:indy2-indy1+1,1:indx2-indx1+1,:);
Note:
See TracChangeset
for help on using the changeset viewer.