I can do this fine for one polygram BUT a for-loop fails.The concept is
multiple lines within each polygon.  I am doing something sub-genius.

ONE POLYGON
   plot(all_pcts_osm_sp[i,], add = FALSE, lwd=.5, border='blue')
   hght <- strheight("Here")
   MyLines <- list(
      bquote( .(all_pcts_osm_sp$PCT[i]) ),
      bquote( .(all_pcts_osm_sp$First_Name[i]) ),
      bquote( .(all_pcts_osm_sp$Last_Name[i]) ),
      bquote( .(all_pcts_osm_sp$Phone) ))
   text( all_pcts_osm_sp[i,]@polygons[[ 1 ]]@labpt[[1]],
         all_pcts_osm_sp[i,]@polygons[[ 1 ]]@labpt[[2]] - (hght * 1.5 *
seq(length(MyLines))),
     do.call(expression, MyLines))

ALL POLYGONS JUST DO NOT WORK.  PUZZLED? Help me please. Also ultimate
target is an OpenStreet ("OSM") backdrop.

   tmp_sp_length <- length(all_pcts_osm_sp)
   i = 1
   for(i in 1:tmp_sp_length) {
      hght <- strheight("Here")
      MyLines <- list(
         bquote( .(all_pcts_osm_sp$PCT[i]) ),
         bquote( .(all_pcts_osm_sp$First_Name[i]) ),
         bquote( .(all_pcts_osm_sp$Last_Name[i]) ),
         bquote( .(all_pcts_osm_sp$Phone) ))
      text( all_pcts_osm_sp[i,]@polygons[[ 1 ]]@labpt[[1]],
         all_pcts_osm_sp[i,]@polygons[[ 1 ]]@labpt[[2]] - (hght * 1.5 *
       seq(length(MyLines))),
         do.call(expression, MyLines))
   }

All your comments, ideas, and thoughts are appreciated.
Thanks
Jim Burke

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to