By podarok on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x-2.x
Introduced in version:
7.x-2.x
Issue links:
Description:
All functions from gmap_polyutil.inc migrated to GmapPolylineToolbox class
gmap_polyutil_encode_latlon($x)
before
$latlon = gmap_polyutil_encode_latlon($x);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$latlon = GmapPolylineToolbox::getInstance()->setLatLonNumber($x)->getEncodedLatLon();
gmap_polyutil_encode_levels($x)
before
$levels = gmap_polyutil_encode_levels($x);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$levels = GmapPolylineToolbox::getInstance()->setLatLonNumber($x)->getEncodedLevels();
_gmap_polyutil_encode($x)
before
$encoded = _gmap_polyutil_encode($x);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$encoded = _GmapPolylineToolbox::getInstance()->setLatLonNumber($x)->getEncode();
gmap_polyutil_dist($p1, $p2)
before
$distance = gmap_polyutil_dist($p1, $p2);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$distance = GmapPolylineToolbox::getInstance()->setLinePoints($p1, $p2)->getDist();
gmap_polyutil_point_line_dist($q, $p1, $p2)
before
$linedist = gmap_polyutil_point_line_dist($q, $p1, $p2);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$linedist = GmapPolylineToolbox::getInstance()->setMeasurePoint($q)->setLinePoints($p1, $p2)->getPointLineDist();
gmap_polyutil_dp_encode($points)
before
$pointsarray = gmap_polyutil_dp_encode($points);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$pointsarray = GmapPolylineToolbox::getInstance()->setPoints($points)->getDPEncode();
gmap_polyutil_polyline($points)
before
$simplepoints = gmap_polyutil_polyline($points);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$simplepoints = return GmapPolylineToolbox::getInstance()->setPoints($points)->getPolyline();
_gmap_polyutil_zoom_levels()
before
$levels = _gmap_polyutil_zoom_levels();
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$levels = return GmapPolylineToolbox::getInstance()->getZoomLevels();
_gmap_polyutil_get_zoom_level($weight)
before
$zoomlevel = _gmap_polyutil_get_zoom_level($weight);
after
use Drupal\gmap\GmapPolylineToolbox;
include_once(drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php');
$zoomlevel = GmapPolylineToolbox::getInstance()->setWeight($weight)->getZoomLevel();
Impacts:
Module developers
Themers