You are here

function legacy__gmap_polyutil_zoom_levels in GMap Module 7.2

Build a logarithmic scale of zoom levels.

2 calls to legacy__gmap_polyutil_zoom_levels()
legacy_gmap_polyutil_dp_encode in tests/inc/gmap_polyutil.inc
Implementation of the Douglas-Peucker polyline simplification algorithm.
legacy__gmap_polyutil_get_zoom_level in tests/inc/gmap_polyutil.inc
Place points in levels based on their "weight".

File

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

Namespace

tests\inc

Code

function legacy__gmap_polyutil_zoom_levels() {
  static $levels;
  if (!isset($levels)) {
    for ($i = 0; $i < GMAP_ZOOM_LEVELS; $i++) {
      $levels[$i] = GMAP_DP_EPSILON * pow(GMAP_ZOOM_FACTOR, GMAP_ZOOM_LEVELS - $i - 1);
    }
  }
  return $levels;
}