function h=statemap(lonreg);
%
%    lonreg = 0;  %longitudes are -180..180 (for US)  [default]
%    lonreg = 1;  %longitudes are 0 .. 360 (for US)
%
%  added map projection capability NOV2017
%


if nargin == 0, lonreg = 0;end
states = shaperead('usastatelo', 'UseGeoCoords', true);
for k = 1:length(states);
  hold on; 
  if ismap(gca)
    h(k)=plotm(states(k).Lat,states(k).Lon + lonreg*360,'k');
  else
    h(k)=plot(states(k).Lon+lonreg*360,states(k).Lat,'k');
  end
end
