diff --git a/libraries/gis/pma_gis_geometry.php b/libraries/gis/pma_gis_geometry.php index 8decdcc42e..575fc73485 100644 --- a/libraries/gis/pma_gis_geometry.php +++ b/libraries/gis/pma_gis_geometry.php @@ -45,7 +45,8 @@ abstract class PMA_GIS_Geometry public abstract function prepareRowAsPdf($spatial, $label, $color, $scale_data, $pdf); /** - * Prepares the JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares the JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS data object * @param int $srid Spatial reference ID @@ -77,9 +78,11 @@ abstract class PMA_GIS_Geometry protected function getBoundsForOl($srid, $scale_data) { return 'bound = new OpenLayers.Bounds(); bound.extend(new OpenLayers.LonLat(' - . $scale_data['minX'] . ', ' . $scale_data['minY'] . ').transform(new OpenLayers.Projection("EPSG:' + . $scale_data['minX'] . ', ' . $scale_data['minY'] + . ').transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject())); bound.extend(new OpenLayers.LonLat(' - . $scale_data['maxX'] . ', ' . $scale_data['maxY'] . ').transform(new OpenLayers.Projection("EPSG:' + . $scale_data['maxX'] . ', ' . $scale_data['maxY'] + . ').transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()));'; } @@ -173,8 +176,10 @@ abstract class PMA_GIS_Geometry $points_arr = $this->extractPoints($polygon, null); $row .= 'new OpenLayers.Geometry.LinearRing(new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' + . $point[0] . ', ' . $point[1] . '))' + . '.transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= '))'; @@ -185,8 +190,10 @@ abstract class PMA_GIS_Geometry $points_arr = $this->extractPoints($ring, null); $row .= 'new OpenLayers.Geometry.LinearRing(new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' + . $point[0] . ', ' . $point[1] . '))' + . '.transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')), '; diff --git a/libraries/gis/pma_gis_geometrycollection.php b/libraries/gis/pma_gis_geometrycollection.php index ca48f082bc..47519c0c2e 100644 --- a/libraries/gis/pma_gis_geometrycollection.php +++ b/libraries/gis/pma_gis_geometrycollection.php @@ -165,7 +165,8 @@ class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry } /** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS GEOMETRYCOLLECTION object * @param int $srid Spatial reference ID diff --git a/libraries/gis/pma_gis_linestring.php b/libraries/gis/pma_gis_linestring.php index dad4f9bcbe..cb82c1201d 100644 --- a/libraries/gis/pma_gis_linestring.php +++ b/libraries/gis/pma_gis_linestring.php @@ -154,7 +154,8 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry } /** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS LINESTRING object * @param int $srid Spatial reference ID @@ -183,8 +184,9 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry $row = 'new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' + . $point[1] . ')).transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')'; diff --git a/libraries/gis/pma_gis_multilinestring.php b/libraries/gis/pma_gis_multilinestring.php index 1289a93115..84d92bdb64 100644 --- a/libraries/gis/pma_gis_multilinestring.php +++ b/libraries/gis/pma_gis_multilinestring.php @@ -179,7 +179,8 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry } /** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS MULTILINESTRING object * @param int $srid Spatial reference ID @@ -213,8 +214,9 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry $points_arr = $this->extractPoints($linestring, null); $row .= 'new OpenLayers.Geometry.LineString(new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' + . $point[1] . ')).transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')), '; diff --git a/libraries/gis/pma_gis_multipoint.php b/libraries/gis/pma_gis_multipoint.php index 48e9099260..bbe37df801 100644 --- a/libraries/gis/pma_gis_multipoint.php +++ b/libraries/gis/pma_gis_multipoint.php @@ -143,7 +143,8 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry } /** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS MULTIPOINT object * @param int $srid Spatial reference ID @@ -175,8 +176,9 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry $row = 'new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] + . ')).transform(new OpenLayers.Projection("EPSG:' . $srid + . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')'; diff --git a/libraries/gis/pma_gis_multipolygon.php b/libraries/gis/pma_gis_multipolygon.php index db6f6cbb4a..743261c5fe 100644 --- a/libraries/gis/pma_gis_multipolygon.php +++ b/libraries/gis/pma_gis_multipolygon.php @@ -154,7 +154,8 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry foreach ($inner as $inner_poly) { $points_arr = array_merge( - $points_arr, $this->extractPoints($inner_poly, $scale_data, true) + $points_arr, + $this->extractPoints($inner_poly, $scale_data, true) ); } } @@ -223,7 +224,8 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry } /** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS MULTIPOLYGON object * @param int $srid Spatial reference ID diff --git a/libraries/gis/pma_gis_point.php b/libraries/gis/pma_gis_point.php index 431857240d..d288555fc6 100644 --- a/libraries/gis/pma_gis_point.php +++ b/libraries/gis/pma_gis_point.php @@ -136,7 +136,8 @@ class PMA_GIS_Point extends PMA_GIS_Geometry } /** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS POINT object * @param int $srid Spatial reference ID @@ -167,9 +168,10 @@ class PMA_GIS_Point extends PMA_GIS_Geometry $points_arr = $this->extractPoints($point, null); $result .= 'vectorLayer.addFeatures(new OpenLayers.Feature.Vector((' - . 'new OpenLayers.Geometry.Point(' . $points_arr[0][0] . ', ' . $points_arr[0][1] . ')' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject())),' - . ' null, ' . json_encode($style_options) . '));'; + . 'new OpenLayers.Geometry.Point(' . $points_arr[0][0] . ', ' + . $points_arr[0][1] . ').transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject())), null, ' + . json_encode($style_options) . '));'; return $result; } } diff --git a/libraries/gis/pma_gis_polygon.php b/libraries/gis/pma_gis_polygon.php index ce8ffa8cf7..97f394c5da 100644 --- a/libraries/gis/pma_gis_polygon.php +++ b/libraries/gis/pma_gis_polygon.php @@ -206,7 +206,8 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry } /** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS POLYGON object * @param int $srid Spatial reference ID diff --git a/libraries/gis/pma_gis_visualization.php b/libraries/gis/pma_gis_visualization.php index 7405bd23b4..ba28777d8c 100644 --- a/libraries/gis/pma_gis_visualization.php +++ b/libraries/gis/pma_gis_visualization.php @@ -209,7 +209,10 @@ class PMA_GIS_Visualization // fill the background $bg = imagecolorallocate($image, 229, 229, 229); - imagefilledrectangle($image, 0, 0, $this->_settings['width'] - 1, $this->_settings['height'] - 1, $bg); + imagefilledrectangle( + $image, 0, 0, $this->_settings['width'] - 1, + $this->_settings['height'] - 1, $bg + ); $scale_data = $this->_scaleDataSet($this->_data); $image = $this->_prepareDataSet($this->_data, 0, $scale_data, 'png', $image);