You are here

function legacy__gmap_polyutil_encode in GMap Module 7.2

Gmap_polyutil encode function.

2 calls to legacy__gmap_polyutil_encode()
legacy_gmap_polyutil_encode_latlon in tests/inc/gmap_polyutil.inc
Encode latlon function.
legacy_gmap_polyutil_encode_levels in tests/inc/gmap_polyutil.inc
Encode levels function.

File

tests/inc/gmap_polyutil.inc, line 54
Encoded polyline utilities.

Namespace

tests\inc

Code

function legacy__gmap_polyutil_encode($x) {
  $result = '';
  while ($x >= 32) {
    $result .= chr((32 | $x & 31) + 63);
    $x >>= 5;
  }
  $result .= chr(($x & 31) + 63);
  return $result;
}