title: Creating an encoded polygon for google maps in PHP
body: <p>I'm just wondering how I can convert points into an encoded polygon for static google maps.</p>
  
  <p>I will be retrieving the data from MySQL as a multipolygon, however I can rearrange the data as needed.</p>
  
  <p>I simply need a good php script that can encode the polygon.</p>
  
  <p>I realize this may seem like a duplicate question, but I have searched everywhere and cannot find anything. There are multiple scripts on-line however there is no documentation as how the array of points is to be formatted and ect.</p>
  
  <p>These include</p>
  
  <ul>
  <li><a href="https://code.google.com/p/opencaching-pl/source/browse/trunk/lib/class.polylineEncoder.php?r=4122" rel="nofollow">https://code.google.com/p/opencaching-pl/source/browse/trunk/lib/class.polylineEncoder.php?r=4122</a></li>
  </ul>
  
  <p>OR</p>
  
  <ul>
  <li><a href="https://github.com/jfsimon/GMapBundle/blob/master/Encoder/PolylineEncoder.php" rel="nofollow">https://github.com/jfsimon/GMapBundle/blob/master/Encoder/PolylineEncoder.php</a></li>
  </ul>
  
  <p>Thanks</p>