function _gmap_polyutil_get_zoom_level in GMap Module 7
Same name and namespace in other branches
- 5 gmap_polyutil.inc \_gmap_polyutil_get_zoom_level()
- 6.2 gmap_polyutil.inc \_gmap_polyutil_get_zoom_level()
- 6 gmap_polyutil.inc \_gmap_polyutil_get_zoom_level()
- 7.2 gmap_polyutil.inc \_gmap_polyutil_get_zoom_level()
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 _gmap_polyutil_get_zoom_level()
- gmap_polyutil_polyline in ./
gmap_polyutil.inc - Simplify a set of points and generate an "Encoded Polyline" for Google Maps.
File
- ./
gmap_polyutil.inc, line 198 - Encoded polyline utilities.
Code
function _gmap_polyutil_get_zoom_level($weight) {
$levels = _gmap_polyutil_zoom_levels();
$i = 0;
while ($levels[$i] > $weight) {
$i++;
}
return GMAP_ZOOM_LEVELS - $i - 1;
}