• Russ Fish's avatar
    Add MapQuest-style pan and zoom controls to the floormap.php3 page, and · aa7d57a9
    Russ Fish authored
    generally improve the clarity and appearance of the maps.  The scale factor
    buttons numbered 1-5 actually correspond to scale factors of 1, 1.5, 2, 2.5,
    and 3.
    
    Notice that the floorimages table in the database now has an integer "scale"
    column to distinguish the cached zoomed-in images with a suffix "-[1-5].jpg" .
    
    I use jpeg files instead of the png files that were used before.  They look as
    good or better, and are a third the size.  Panning around at a given zoom
    factor just involves cropping out a different rectangle of the scaled-up
    images.
    
    The 0311X064_[1-4]fl.pdf floor map files we got from Michael Kay started
    out life in Adobe Illustrator.  Although GhostScript/gv crash while
    trying to draw the pdf files, extracting them into PostScript files in
    Acrobat on Coke allows GhostScript to render them flawlessly.
    
    I started out using gs to render jpeg files in the shell, and then
    found that ImageMagick uses the same GhostScript renderer, and nicely
    handles cropping, drawing and annotations, and format conversion as well.
    
    The PostScript rendering gets slow at higher zoom factors.  So I cache the
    zoomed floor images, scaled up by rendering the PostScript files at a finer
    dot-pitch (density) in GhostScript, and then cropping out the right rectangle
    to register them properly.
    
    For readability, and to avoid having the thin lines and bitmap fonts used in
    some parts of the PostScript map from falling between the pixel cracks, I
    actually render at twice the pixel density and filter down to the final image
    with a gaussian -sharpen option to keep it from looking blurry.
    
    ImageMagick is callable from both the shell and as the Image::Magick package
    in Perl.  I converted the Perl logic in floormap.in to use Image::Magick
    instead of the GD graphics library, resulting in anti-aliased (smoothed)
    drawing of the wireless node dots and labels on floor maps for a better
    appearance.  Then I added optional scaling and centering arguments which
    select the proper cached zoomed-in image, and drive the logic for cropping and
    drawing.
    
    I modified the floormap.php3 file to wrap an input form around a set of zoom
    control buttons and the floormap image.  The zoom buttons set the scale
    argument to the Perl floormap script called on the server.  The floor map
    image itself is wrapped in a graphical submit button, so clicking on it
    returns the mouse coordinates within the image, which are then sent to the
    centering argument of the Perl script.
    aa7d57a9
Name
Last commit
Last update
..
autostatus-icons Loading commit data...
buildui Loading commit data...
cvsweb Loading commit data...
doc Loading commit data...
downloads Loading commit data...
hyperviewer Loading commit data...
netlab Loading commit data...
pix Loading commit data...
sdr Loading commit data...
tutorial Loading commit data...
webdb Loading commit data...
.htaccess Loading commit data...
1px.gif Loading commit data...
GNUmakefile.in Loading commit data...
TOCHECK Loading commit data...
TODO Loading commit data...
apc.php Loading commit data...
approveproject.php3 Loading commit data...
approveproject_form.php3 Loading commit data...
approveproject_list.php3 Loading commit data...
approveuser.php3 Loading commit data...
approveuser_form.php3 Loading commit data...
approvewauser.php3 Loading commit data...
approvewauser_form.php3 Loading commit data...
auth.html Loading commit data...
beginexp_form.php3 Loading commit data...
beginexp_html.php3 Loading commit data...
beginexp_xml.php3 Loading commit data...
blueball.gif Loading commit data...
blueball.png Loading commit data...
boot.php3 Loading commit data...
btn_scale_1_brt.jpg Loading commit data...
btn_scale_1_dim.jpg Loading commit data...
btn_scale_2_brt.jpg Loading commit data...
btn_scale_2_dim.jpg Loading commit data...
btn_scale_3_brt.jpg Loading commit data...
btn_scale_3_dim.jpg Loading commit data...
btn_scale_4_brt.jpg Loading commit data...
btn_scale_4_dim.jpg Loading commit data...
btn_scale_5_brt.jpg Loading commit data...
btn_scale_5_dim.jpg Loading commit data...
btn_zoom_in.jpg Loading commit data...
btn_zoom_out.jpg Loading commit data...
cdrom.php Loading commit data...
cdromcheckin.php3 Loading commit data...
cdromdownload.php Loading commit data...
cdrominstallhelp.php Loading commit data...
cdromnewkey.php Loading commit data...
cdromqueue.php3 Loading commit data...
cdromrequest.php3 Loading commit data...
changeall.csh Loading commit data...
chpasswd.php3 Loading commit data...
clearapc.php Loading commit data...
coming-soon-thumb.gif Loading commit data...
common-style.css Loading commit data...
console.gif Loading commit data...
cool.gif Loading commit data...
copyright.html Loading commit data...
dbcheck.php3 Loading commit data...
dbdefs.php3.in Loading commit data...
defs.php3.in Loading commit data...
delaycontrol.php3 Loading commit data...
deletegroup.php3 Loading commit data...
deleteimageid.php3 Loading commit data...
deletenodelog.php3 Loading commit data...
deleteosid.php3 Loading commit data...
deleteproject.php3 Loading commit data...
deletepubkey.php3 Loading commit data...
deletesfskey.php3 Loading commit data...
deleteuser.php3 Loading commit data...
doc.php3 Loading commit data...
docwrapper.php3 Loading commit data...
editexp.php3 Loading commit data...
editgroup.php3 Loading commit data...
editgroup_form.php3 Loading commit data...
editimageid.php3 Loading commit data...
editimageid_form.php3 Loading commit data...
editnodetype.php3 Loading commit data...
editsitevars.php3 Loading commit data...
emailus.php3 Loading commit data...
endexp.php3 Loading commit data...
error.php3 Loading commit data...
error.shtml Loading commit data...
expaccess.php3 Loading commit data...
expaccess_form.php3 Loading commit data...
explist.php3 Loading commit data...
faq.html Loading commit data...
faq.php3 Loading commit data...
favicon.ico Loading commit data...
feedback.php3 Loading commit data...
floormap.php3 Loading commit data...
floormap_aux.php3 Loading commit data...
freenode.php3 Loading commit data...
freezeuser.php3 Loading commit data...
gensslcert.php3 Loading commit data...
getsslcert.php3 Loading commit data...
greenball.gif Loading commit data...
greenball.png Loading commit data...
groups.html Loading commit data...
hardware.html Loading commit data...
headerbgbb.jpg Loading commit data...
index.html Loading commit data...
index.php3 Loading commit data...
java.html Loading commit data...
joinproject.php3 Loading commit data...
lanicon.png Loading commit data...
linktest.php3 Loading commit data...
loadimage.php3 Loading commit data...
login.php3 Loading commit data...
login_plab.php3 Loading commit data...
logoff.gif Loading commit data...
logon.gif Loading commit data...
logout.php3 Loading commit data...
meb1fl-1.jpg Loading commit data...
meb1fl-thumb.jpg Loading commit data...
meb2fl-1.jpg Loading commit data...
meb2fl-thumb.jpg Loading commit data...
meb3fl-1.jpg Loading commit data...
meb3fl-thumb.jpg Loading commit data...
meb4fl-1.jpg Loading commit data...
meb4fl-2.jpg Loading commit data...
meb4fl-3.jpg Loading commit data...
meb4fl-thumb.jpg Loading commit data...
menu.php3 Loading commit data...
modifyexp.php3 Loading commit data...
moduserinfo.php3 Loading commit data...
netbed-icon-howto.txt Loading commit data...
netbed.ico Loading commit data...
netbed.png Loading commit data...
netemu.php3 Loading commit data...
new.gif Loading commit data...
newgroup.php3 Loading commit data...
newgroup_form.php3 Loading commit data...
newimageid.php3 Loading commit data...
newimageid_ez.php3 Loading commit data...
newnode-defs.php3 Loading commit data...
newnode_edit.php3 Loading commit data...
newnodecheckin.php Loading commit data...
newnodelog.php3 Loading commit data...
newnodelog_form.php3 Loading commit data...
newnodes_list.php3 Loading commit data...
newosid.php3 Loading commit data...
newosid_form.php3 Loading commit data...
newproject.php3 Loading commit data...
news.php3 Loading commit data...
nodecontrol.php3 Loading commit data...
nodecontrol_form.php3 Loading commit data...
nodecontrol_list.php3 Loading commit data...
nodeicon.png Loading commit data...
nodemon.php3 Loading commit data...
nodemon_all.php3 Loading commit data...
nodessh.php3 Loading commit data...
nodetipacl.php3 Loading commit data...
nologins.php3 Loading commit data...
nscheck.php3 Loading commit data...
nscheck_form.php3 Loading commit data...
osiddefs.php3 Loading commit data...
otheremulabs.html Loading commit data...
overlay.emulab.net.gif Loading commit data...
overlay.gif Loading commit data...
overlay.mac.emulab.net.gif Loading commit data...
overlay.mini.emulab.net.gif Loading commit data...
overlay.netlab.cc.gatech.edu.gif Loading commit data...
overlay.stoller.emulab.net.gif Loading commit data...
overlay.uky.emulab.net.gif Loading commit data...
password.php3 Loading commit data...
people.php3 Loading commit data...
plab_ez.php3 Loading commit data...
plab_ez_footnote1.html Loading commit data...
plab_ez_footnote2.html Loading commit data...
plab_ez_footnote3.html Loading commit data...
plab_ez_footnote4.html Loading commit data...
plab_ez_footnote5.html Loading commit data...
plab_ez_footnote6.html Loading commit data...
plab_ez_footnote7.html Loading commit data...
plab_ez_footnote8.html Loading commit data...
plabmetrics.php3 Loading commit data...
plabstats.php3 Loading commit data...
policies.html Loading commit data...
projectlist.php3 Loading commit data...
pubs.html Loading commit data...
pubs.php3 Loading commit data...
redball.gif Loading commit data...
redball.png Loading commit data...
remapexp.php3 Loading commit data...
reqaccount.php3 Loading commit data...
request_swapexp.php3 Loading commit data...
requestaccount.gif Loading commit data...
resendkey.php3 Loading commit data...
sc2002tut.php3 Loading commit data...
search.php3 Loading commit data...
security.html Loading commit data...
sendemail.php3 Loading commit data...
setnodeloc.php3 Loading commit data...
showexp.php3 Loading commit data...
showexp_list.php3 Loading commit data...
showexpstats.php3 Loading commit data...
showgroup.php3 Loading commit data...
showimageid.php3 Loading commit data...
showimageid_list.php3 Loading commit data...
shownode.php3 Loading commit data...
shownodelog.php3 Loading commit data...
shownodetype.php3 Loading commit data...
shownsfile.php3 Loading commit data...
showosid_list.php3 Loading commit data...
showosinfo.php3 Loading commit data...
showproject.php3 Loading commit data...
showproject_list.php3 Loading commit data...
showpubkeys.php3 Loading commit data...
showsfskeys.php3 Loading commit data...
showstats.php3 Loading commit data...
showstuff.php3 Loading commit data...
showsumstats.php3 Loading commit data...
showthumb.php3 Loading commit data...
showuser.php3 Loading commit data...
showuser_list.php3 Loading commit data...
software.html Loading commit data...
software.php3 Loading commit data...
spewlogfile.php3 Loading commit data...
spewrpmtar.php3 Loading commit data...
spitnsdata.php3 Loading commit data...
sponsors.html Loading commit data...
ssh-mime-windows.pl Loading commit data...
ssh-mime.c Loading commit data...
ssh-mime.html Loading commit data...
ssh-mime.pl Loading commit data...
ssh.gif Loading commit data...
start.php3 Loading commit data...
style-nonmain.css Loading commit data...
style.css Loading commit data...
survey.php3 Loading commit data...
swapexp.php3 Loading commit data...
swapping.html Loading commit data...
swish.conf.in Loading commit data...
tbauth.php3 Loading commit data...
tbstyle-doc.css Loading commit data...
tbstyle-plain.css Loading commit data...
tbstyle.css Loading commit data...
toggle.php Loading commit data...
top2image.php3 Loading commit data...
updateaccounts.php3 Loading commit data...
updown.php3 Loading commit data...
verifyusr.php3 Loading commit data...
verifyusr_form.php3 Loading commit data...
wallpaper0.jpg Loading commit data...
wallpaper1.png Loading commit data...
websearch.in Loading commit data...
widearea.html Loading commit data...
widearea_info.php3 Loading commit data...
widearea_nodeinfo.php3 Loading commit data...
widearea_redirect.php Loading commit data...
widearea_register.php Loading commit data...
wideareakeys.php3 Loading commit data...