Index: trunk/extensions/geo/geo.php |
— | — | @@ -40,18 +40,31 @@ |
41 | 41 | $b = explode ( ";" , str_replace ( "," , ";" , $a[0] ) ) ; |
42 | 42 | foreach ( $b AS $c ) |
43 | 43 | { |
44 | | - if ( $key == "style" ) |
45 | | - $this->styles[$c][] = $a[1] ; |
46 | | - else if ( $key == "label" ) |
| 44 | +# if ( $key == "style" ) |
47 | 45 | { |
48 | 46 | $d = explode ( ";" , str_replace ( "," , ";" , $a[1] ) ) ; |
49 | 47 | foreach ( $d AS $e ) |
50 | 48 | { |
51 | 49 | $e = explode ( ":" , $e ) ; |
| 50 | + $va = trim ( strtolower ( $e[0] ) ) ; |
| 51 | + if ( count ( $e ) < 2 ) $vb = "" ; #/*$this->styles*/$kv[$c][$e[0]] = "" ; |
| 52 | + else $vb = trim ( strtolower ( $e[1] ) ) ;# /*$this->styles*/$kv[$c][$e[0]] = trim ( strtolower ( $e[1] ) ) ; |
| 53 | + if ( $key == "style" ) $this->styles[$c][$va] = $vb ; |
| 54 | + else $this->label_styles[$c][$va] = $vb ; |
| 55 | +# print "{$va} : " .$vb. "\n" ; |
| 56 | + } |
| 57 | + } |
| 58 | +# $this->styles[$c][] = $a[1] ; |
| 59 | +/* else if ( $key == "label" ) |
| 60 | + { |
| 61 | + $d = explode ( ";" , str_replace ( "," , ";" , $a[1] ) ) ; |
| 62 | + foreach ( $d AS $e ) |
| 63 | + { |
| 64 | + $e = explode ( ":" , $e ) ; |
52 | 65 | if ( count ( $e ) < 2 ) $this->label_styles[$c][$e[0]] = "" ; |
53 | 66 | else $this->label_styles[$c][$e[0]] = $e[1] ; |
54 | 67 | } |
55 | | - } |
| 68 | + }*/ |
56 | 69 | } |
57 | 70 | } |
58 | 71 | } |
— | — | @@ -244,6 +257,7 @@ |
245 | 258 | $s .= "' x='{$x}' y='{$y}'>{$text}</text>" ; |
246 | 259 | if ( isset ( $l['href'] ) ) |
247 | 260 | { |
| 261 | + print $l['href'] . "\n" ; |
248 | 262 | $href = $l['href'] ; |
249 | 263 | $s = "<a xlink:href={$href}>{$s}</a>" ; |
250 | 264 | } |
— | — | @@ -569,7 +583,10 @@ |
570 | 584 | if ( $k != "" ) $ret[strtolower($k)] = strtolower($v) ; |
571 | 585 | } |
572 | 586 | } |
573 | | - $ret = "style=\"" . implode ( "; " , $ret ) . "\"" ; |
| 587 | + $s = "" ; |
| 588 | + foreach ( $ret AS $k => $v ) |
| 589 | + $s .= "{$k}:{$v}; " ; |
| 590 | + $ret = "style=\"{$s}\"" ; |
574 | 591 | return $ret ; |
575 | 592 | # $t = trim ( strtolower ( $this->get_current_type ( $params ) ) ) ; |
576 | 593 | # $s = $params->get_styles ( $this->id , $t ) ; |
Index: trunk/extensions/geo/index.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | draw:germany.bavaria.cities#munich |
19 | 19 | style:germany[state],germany[isle]=fill:#CCCCCC; stroke:black; stroke-width:10 |
20 | 20 | style:germany.hamburg=fill:red |
21 | | -label:germany.bavaria.cities#munich=font-size:medium;fill-opacity:1.0;clickable |
| 21 | +label:germany.bavaria.cities#munich=font-size:medium;fill-opacity:1.0;clickable:yes |
22 | 22 | label:germany[state]=font-size:medium;fill-opacity:0.7 |
23 | 23 | " ) ; |
24 | 24 | |