54 private function compile_area( $Data , $Coords )
58 $this->Output .= $this->CachedMultyFS->get_template( __FILE__ ,
'area.tpl' );
59 $this->Output = str_replace(
60 array(
'{title}' ,
'{coords}' ) , array( $Data , $Coords ) , $this->Output
99 $GlobalCenterX = $this->ClientX + $this->CoordX;
100 $GlobalCenterY = $this->Height - $this->ClientY - $this->CoordY;
102 list( $dX , $dY ) = $this->get_scales( $DataX , $DataY );
104 $c = count( $DataX );
108 for( $i = 0 ; $i < $c ; $i++ )
110 $x = intval( $GlobalCenterX + ( $DataX[ $i ] - min( $DataX ) ) * $dX + $this->MarginLeft );
111 $y = intval( $GlobalCenterY - ( $DataY[ $i + 0 ] - min( $DataY ) ) * $dY - $this->MarginBottom );
113 $this->compile_area( $DataY[ $i ] ,
"$x,$y" );
116 catch( Exception $e )
140 private function prepare_map_generation( &$Options )
144 $Width = $Options->get_setting(
'width' , 640 );
145 $Height = $Options->get_setting(
'height' , 480 );
147 $this->
set(
'Width' , $Width );
148 $this->
set(
'Height' , $Height );
150 $ClientX = $Options->get_setting(
'client_x' , 50 );
151 $ClientY = $Options->get_setting(
'client_y' , 20 );
152 $ClientWidth = $Options->get_setting(
'client_width' , $Width - 70 );
153 $ClientHeight = $Options->get_setting(
'client_height' , $Height - 40 );
154 $this->compile_client_width_height( $ClientX , $ClientY , $ClientWidth , $ClientHeight );
156 catch( Exception $e )
184 $this->prepare_map_generation( $Options );
186 $DataY = explode(
',' , $Options->get_setting(
'data_y' ) );
187 $DataX = explode(
',' , $Options->get_setting(
'data_x' ) );
190 $MapName = $Options->get_setting(
'map_name' ,
'graph_map' );
191 $this->Output = $this->CachedMultyFS->get_template( __FILE__ ,
'map.tpl' );
192 $this->Output = str_replace(
193 array(
'{map_name}' ,
'{output}' ) , array( $MapName , $this->Output ) , $this->Output
196 catch( Exception $e )