function gmap_polyutil_polyline in GMap Module 7.2
Same name and namespace in other branches
- 5 gmap_polyutil.inc \gmap_polyutil_polyline()
- 6.2 gmap_polyutil.inc \gmap_polyutil_polyline()
- 6 gmap_polyutil.inc \gmap_polyutil_polyline()
- 7 gmap_polyutil.inc \gmap_polyutil_polyline()
Simplify a set of points and generate an "Encoded Polyline" for Google Maps.
Parameters
array $points: An array of coordinate pairs as latitude, longitude.
Return value
array An array containing the point and zoom information necessary to display encoded polylines on Google Maps: 'points', 'levels', 'numLevels', and 'zoomFactor'.
Deprecated
use GmapPolylineToolbox::getInstance()->setPoints($points)->getPolyline();
File
- ./
gmap_polyutil.inc, line 142 - Encoded polyline utilities.
Code
function gmap_polyutil_polyline($points) {
include_once drupal_get_path('module', 'gmap') . '/lib/Drupal/gmap/GmapPolylineToolbox.php';
return GmapPolylineToolbox::getInstance()
->setPoints($points)
->getPolyline();
}