我正在寻找一个PHP函数,该函数将点数组编码为编码的多段线。
算法描述如下:
http://code.google.com/apis/maps/documentation/utilities/polylinealgorithm.html
我似乎找不到任何方法来做这件事,我到处找都找不到。
你见过这个网站吗:http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
它有用Javascript、PHP、Java、Ruby和Perl编写的编码器。
更新2014-03-17
上面的链接已经死了,这里是PHP类的一个新链接http://perassi.org/quickhacks/polyline/class.polylineEncoder.phps