imagemap.class.php 1.34 KB
<?php

class imagemap {


var $mp             = "1";
var $place_width    = "10";
var $place_height   = "10";
var $map_name       = "paikkakartta";
var $notice_color   = "white";
var $notice_width   = "200";
    function __constructor() {
        $this->start();
    } // end of constructor

    function start() {
        return("<map name=\"$this->map_name\" id=\"$this->map_name\">\n");

    } // end of func start()

    function end() {
        return("</map>\n");

    }

    function write_place($x, $y, $href, $kuvaus) {
        $x = $x * $this->mp;
        $y = $y * $this->mp;
        $x2 = $x + ($this->place_width * $this->mp);
        $y2 = $y + ($this->place_height * $this->mp);
        $vari = $this->notice_color;
        $width = $this->width;
/*        return("
        <area shape=\"rect\" 
        href=\"$href\" 
        COORDS=\"$x,$y,$x2,$y2\" 
        onMouseover=\"ddrivetip('$kuvaus','$vari', '$width')\" 
        onMouseout=\"hideddrivetip()\"
        alt=\"$href\">\n");
 */
        return ("\t\t<area shape='rect' href='$href' coords='$x,$y,$x2,$y2' alt='$href' onMouseOver=\"Tip('$kuvaus')\" OnMouseOut=\"UnTip()\" >\n");
#        return ("\t\t<area shape='rect' href='$href' coords='$x,$y,$x2,$y2' onMouseOver=\"ddrivetip('$kuvaus', '$vari', '$width')\" onMouseOut=\"hidedrivetip()\" alt='$href'>\n");


    } // end of write_place() 
}