You are here

public function GmapPolylineToolbox::getEncodedLatLon in GMap Module 7.2

Former gmap_polyutil_encode_latlon($x).

Return value

string LatLon.

File

lib/Drupal/gmap/GmapPolylineToolbox.php, line 107
Contains GmapPolylineToolbox.php Encoded polyline utilities.

Class

GmapPolylineToolbox

Namespace

Drupal\gmap

Code

public function getEncodedLatLon() {
  $this->latlonNumber = round($this->latlonNumber * 100000.0) << 1;
  if ($this->latlonNumber < 0) {
    $this->latlonNumber = ~$this->latlonNumber;
  }
  $this->encodedlatlonNumber = $this
    ->setLatLonNumber($this->latlonNumber)
    ->getEncode();
  return $this->encodedlatlonNumber;
}