You are here

public function GmapPolylineToolbox::getZoomLevel in GMap Module 7.2

Place points in levels.

former _gmap_polyutil_get_zoom_level($weight)

Place points in levels based on their "weight" -- a value derived from distance calculations in the simplification algorithm, gmap_polyutil_dp_encode().

Return value

int Zoom level.

File

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

Class

GmapPolylineToolbox

Namespace

Drupal\gmap

Code

public function getZoomLevel() {
  $i = 0;
  while (self::$levels[$i] > $this->weight) {
    $i++;
  }
  return self::GMAP_ZOOM_LEVELS - $i - 1;
}