url1 = 'http://raster.nationalmap.gov/arcgis/services/Orthoimagery/USGS_EROS_Ortho/ImageServer/WMSServer?';
url2 = 'http://geoint.nrlssc.navy.mil/osm/wms/OSM/basemap/Mapnik/OSM_BASEMAP?';
lim.lat = [37.7055362 37.8274702];           
lim.lon = [-122.5193077 -122.3576067];
img.h = 420 * 2;                                      
img.w = 560 * 2;    
sf_lat = 37.7577627;
sf_lon = -122.4397891;                                
% dar = [1, cosd(sf_lat), 1];              

wms = wmsinfo(url1);                                    
                                                        
layer = wms.Layer;                                      
[A,R] = wmsread(layer, 'ImageFormat', 'image/png', ...  
    'Lonlim', lim.lon, 'Latlim', lim.lat, ...
    'ImageHeight', img.h, 'ImageWidth', img.w);