begin hotel name, nStars
  # Draw hotel name inside a box the same width as the name.
  #
  font 'Helvetica-Narrow-Bold', 3
  color '#A00000'
  clearpath
  move 2, 0
  box 2, 0, 2 + stringwidth(name), 4
  move 0, 2
  draw 2, 4, 2, 0, 0, 2
  fill
  clearpath
  move 2, 1
  color 'white'
  label name
  # Draw box below hotel name, then show number of stars inside it.
  #
  clearpath
  color '#A00000'
  let stars = '* ' x nStars
  box 2, -2, stringwidth(stars) + 2, 0
  fill
  clearpath
  color 'yellow'
  move 2, -2
  label stars
end

# Display the ESRI Shape file hotel.shp in a PostScript file.
#
newpage "eps", "tutorialdatasets3.eps", 65, 50
dataset "shapefile", "hotel.shp", ""
# Expand bounding box to the right so labels don't run off edge of page.
#
worlds Mapyrus.dataset.min.x, Mapyrus.dataset.min.y, \
  Mapyrus.dataset.max.x + Mapyrus.dataset.width / 5, Mapyrus.dataset.max.y
while Mapyrus.fetch.more
do
  fetch
  clearpath
  addpath GEOMETRY
  print "DEBUG:", GEOMETRY, HOTELNAME, STARRATING
  hotel HOTELNAME, STARRATING
done
