function legacy__gmap_polyutil_get_zoom_level in GMap Module 7.2
Place points in levels based on their "weight".
A value derived from distance calculations in the simplification algorithm, gmap_polyutil_dp_encode().
1 call to legacy__gmap_polyutil_get_zoom_level()
- legacy_gmap_polyutil_polyline in tests/
inc/ gmap_polyutil.inc - Simplify a set of points and generate an "Encoded Polyline" for Google Maps.
File
- tests/
inc/ gmap_polyutil.inc, line 231 - Encoded polyline utilities.
Namespace
tests\incCode
function legacy__gmap_polyutil_get_zoom_level($weight) {
$levels = legacy__gmap_polyutil_zoom_levels();
$i = 0;
while ($levels[$i] > $weight) {
$i++;
}
return GMAP_ZOOM_LEVELS - $i - 1;
}