<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Polylines in Google Maps [Part 2]</title>
	<atom:link href="http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/</link>
	<description>A blog about web developement and usability.</description>
	<lastBuildDate>Thu, 11 Mar 2010 11:02:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-10661</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Tue, 29 Dec 2009 09:46:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-10661</guid>
		<description>&lt;strong&gt;&lt;em&gt;Keogh:&lt;/em&gt;&lt;/strong&gt; Performance wise that would be the best solutions. The drawbacks I can see is that it&#039;s a bit more work to update the information in the database and also if you in the future want to use the data for some other purpose in a context which does not support encoded polylines.</description>
		<content:encoded><![CDATA[<p><strong><em>Keogh:</em></strong> Performance wise that would be the best solutions. The drawbacks I can see is that it&#8217;s a bit more work to update the information in the database and also if you in the future want to use the data for some other purpose in a context which does not support encoded polylines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keogh</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-10645</link>
		<dc:creator>keogh</dc:creator>
		<pubDate>Mon, 28 Dec 2009 19:33:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-10645</guid>
		<description>Hi, great articles both part I and II, I wonder if it is recommended or a good approach if I encoded the points in the server and save the encoded points into a database record, say MySQL, could this cause problems in the future? which ones?

Thanks a lot!

Regards from Mexico</description>
		<content:encoded><![CDATA[<p>Hi, great articles both part I and II, I wonder if it is recommended or a good approach if I encoded the points in the server and save the encoded points into a database record, say MySQL, could this cause problems in the future? which ones?</p>
<p>Thanks a lot!</p>
<p>Regards from Mexico</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Griffiths</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-10122</link>
		<dc:creator>Michael Griffiths</dc:creator>
		<pubDate>Fri, 27 Nov 2009 18:48:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-10122</guid>
		<description>Hey there Gabriel,

I&#039;m working with encoded polygons both using your PHP port and the original Javascript version of the dpEncode utilities.

Everything works great, however am having issues using my complex polygons within Google Static Maps. I may be SOL (Sh*t out of Luck), but no hurt in seeking some advice.

&lt;a href=&quot;http://code.google.com/apis/maps/documentation/staticmaps/#Paths&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/maps/documentation/staticmaps/#Paths&lt;/a&gt;

Basically when using a simple encoded polygon things work fine. However when using a complex encoded polyline (72 points used to plot a radius circle) I get nothing but problems.

Pretty sure that the underlyiing issue is that the Google Static Map API does not allow me to supply the encoded &#039;zoomLevels&#039; like the JS API does (using GPolyline.fromEncoded).

&lt;a href=&quot;http://maps.google.com/maps/api/staticmap?center=30.4180166,-98.08405515&amp;path=color:0x0000FF80&#124;weight:5&#124;30.500317115484354,-98.10859680175781&#124;30.309625326432403,-98.11683654785156&#124;30.24558327131408,-97.87788391113281&#124;30.611480265719013,-97.85179138183594&#124;30.36888624018843,-97.96989440917969&#124;30.500317115484354,-98.10859680175781&amp;sensor=false&amp;size=150x175&amp;key=ABQIAAAAprPE6TT0bMAmU_CXQBwYVxQNz_OWRb3C3bpps-P17pXyfXsB7hSDbXv8U7ZD2eVhsyYji3PpsNc8QQ&quot; rel=&quot;nofollow&quot;&gt;This Works
&lt;/a&gt;

While...

&lt;a href=&quot;http://maps.google.com/maps/api/staticmap?center=30.4180166,-98.08405515&amp;path=color:0x0000FF80&#124;weight:5&#124;y&#124;%60zDjvfuQh@wa@zBqa@nE_a@~Gg%60@nJe_@zL{]%60Ok\hQuZfSsX%60UqVxVeThXuQpYaOtZiLr[mIf\qFv\oC&#124;\o@&#124;\n@v\pCf\pFp[nItZjLpY%60OhXvQvVdTbUnVdStXfQrZbOj\xLz]nJb_@~Gd%60@nE~%60@zBna@h@va@i@xa@{Bna@oE~%60@_Hd%60@oJb_@yLz]cOj\gQrZeStXcUnVwVdTiXvQqY%60OuZjLq[nIg\nFw\pC}\p@}\o@w\oCg\qFs[mIuZiLqYaOiXuQyVeTaUqVgSsXiQuZaOk\{L{]oJe_@_Hg%60@oE_a@{Bqa@i@ya@&amp;sensor=false&amp;size=150x175&amp;key=ABQIAAAAprPE6TT0bMAmU_CXQBwYVxQNz_OWRb3C3bpps-P17pXyfXsB7hSDbXv8U7ZD2eVhsyYji3PpsNc8QQ&quot; rel=&quot;nofollow&quot;&gt;This does not&lt;/a&gt;

I&#039;ve also tried passing the points to the static maps but of course the request URI is too long.

Encoded Polyline:

&lt;code&gt;iuzxDrqatQfCipBxKmoBdTwmBl\ekBnd@wgBfl@qcBrs@q~Apz@{xAdaAorAdgAokAtlA{cApqAw{@xuAes@jyAej@h&#124;A{`@n~AiW~_BqMt`BwCt`BbD&#124;_B~Ml~AtWf&#124;Afa@fyAlj@tuAls@jqA&#124;{@nlA&#124;cA~fApkA~`AlrAlz@xxAns@j~A`l@hcBjd@ngBh\xjBbTjmBvK`oBfCzoBgC&#124;oBwK`oBcTjmBi\xjBkd@ngBal@hcBos@j~Amz@xxA_aAlrA_gAnkAolA~cAkqA&#124;{@uuAjs@gyAnj@g&#124;Afa@m~AtW}_B&#124;Mu`BdDu`BwC_`BqMo~AiWi&#124;A}`@kyAcj@yuAes@qqAw{@ulA{cAegAokAeaAorAqz@{xAss@q~Agl@qcBod@ygBm\ckBeTwmByKmoBgCkpB&lt;/code&gt;

Encoded Levels:

&lt;code&gt;PCECGCFDCICECGCFDCKCECGCFDCICECGCEDCLCDECGCECICDFCGCECKCDFCGCECICDFCGCECP&lt;/code&gt;

Something tells me I&#039;m trying to do way too much with the Static Maps.</description>
		<content:encoded><![CDATA[<p>Hey there Gabriel,</p>
<p>I&#8217;m working with encoded polygons both using your <acronym title="Pre-Hypertext Processing">PHP</acronym> port and the original Javascript version of the dpEncode utilities.</p>
<p>Everything works great, however am having issues using my complex polygons within Google Static Maps. I may be SOL (Sh*t out of Luck), but no hurt in seeking some advice.</p>
<p><a href="http://code.google.com/apis/maps/documentation/staticmaps/#Paths" rel="nofollow">http://code.google.com/apis/maps/documentation/staticmaps/#Paths</a></p>
<p>Basically when using a simple encoded polygon things work fine. However when using a complex encoded polyline (72 points used to plot a radius circle) I get nothing but problems.</p>
<p>Pretty sure that the underlyiing issue is that the Google Static Map <acronym title="Application Programming Interface">API</acronym> does not allow me to supply the encoded &#8216;zoomLevels&#8217; like the <acronym title="JavaScript">JS</acronym> <acronym title="Application Programming Interface">API</acronym> does (using GPolyline.fromEncoded).</p>
<p><a href="http://maps.google.com/maps/api/staticmap?center=30.4180166,-98.08405515&amp;path=color:0x0000FF80|weight:5|30.500317115484354,-98.10859680175781|30.309625326432403,-98.11683654785156|30.24558327131408,-97.87788391113281|30.611480265719013,-97.85179138183594|30.36888624018843,-97.96989440917969|30.500317115484354,-98.10859680175781&amp;sensor=false&amp;size=150x175&amp;key=ABQIAAAAprPE6TT0bMAmU_CXQBwYVxQNz_OWRb3C3bpps-P17pXyfXsB7hSDbXv8U7ZD2eVhsyYji3PpsNc8QQ" rel="nofollow">This Works<br />
</a></p>
<p>While&#8230;</p>
<p><a href="http://maps.google.com/maps/api/staticmap?center=30.4180166,-98.08405515&amp;path=color:0x0000FF80|weight:5|y|%60zDjvfuQh@wa@zBqa@nE_a@~Gg%60@nJe_@zL{]%60Ok\hQuZfSsX%60UqVxVeThXuQpYaOtZiLr[mIf\qFv\oC|\o@|\n@v\pCf\pFp[nItZjLpY%60OhXvQvVdTbUnVdStXfQrZbOj\xLz]nJb_@~Gd%60@nE~%60@zBna@h@va@i@xa@{Bna@oE~%60@_Hd%60@oJb_@yLz]cOj\gQrZeStXcUnVwVdTiXvQqY%60OuZjLq[nIg\nFw\pC}\p@}\o@w\oCg\qFs[mIuZiLqYaOiXuQyVeTaUqVgSsXiQuZaOk\{L{]oJe_@_Hg%60@oE_a@{Bqa@i@ya@&amp;sensor=false&amp;size=150x175&amp;key=ABQIAAAAprPE6TT0bMAmU_CXQBwYVxQNz_OWRb3C3bpps-P17pXyfXsB7hSDbXv8U7ZD2eVhsyYji3PpsNc8QQ" rel="nofollow">This does not</a></p>
<p>I&#8217;ve also tried passing the points to the static maps but of course the request <acronym title="Uniform Resource Identifier">URI</acronym> is too long.</p>
<p>Encoded Polyline:</p>
<p><code>iuzxDrqatQfCipBxKmoBdTwmBl\ekBnd@wgBfl@qcBrs@q~Apz@{xAdaAorAdgAokAtlA{cApqAw{@xuAes@jyAej@h|A{`@n~AiW~_BqMt`BwCt`BbD|_B~Ml~AtWf|Afa@fyAlj@tuAls@jqA|{@nlA|cA~fApkA~`AlrAlz@xxAns@j~A`l@hcBjd@ngBh\xjBbTjmBvK`oBfCzoBgC|oBwK`oBcTjmBi\xjBkd@ngBal@hcBos@j~Amz@xxA_aAlrA_gAnkAolA~cAkqA|{@uuAjs@gyAnj@g|Afa@m~AtW}_B|Mu`BdDu`BwC_`BqMo~AiWi|A}`@kyAcj@yuAes@qqAw{@ulA{cAegAokAeaAorAqz@{xAss@q~Agl@qcBod@ygBm\ckBeTwmByKmoBgCkpB</code></p>
<p>Encoded Levels:</p>
<p><code>PCECGCFDCICECGCFDCKCECGCFDCICECGCEDCLCDECGCECICDFCGCECKCDFCGCECICDFCGCECP</code></p>
<p>Something tells me I&#8217;m trying to do way too much with the Static Maps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-9886</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Tue, 17 Nov 2009 22:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-9886</guid>
		<description>&lt;strong&gt;&lt;em&gt;Benco:&lt;/em&gt;&lt;/strong&gt; The greatest benefit doesn&#039;t come from that the file size gets smaller, I&#039;m sure that using zip compression would probably be just as effective. The main benefit comes from not doing the encoding with JavaScript. Because processing it with JavaScript is really slow compared to processing it on the server. Especially in some browsers (read IE).

I haven&#039;t really done any optimizing on this site, so there&#039;s a lot of things I could do. If only I can find the time... :-)</description>
		<content:encoded><![CDATA[<p><strong><em>Benco:</em></strong> The greatest benefit doesn&#8217;t come from that the file size gets smaller, I&#8217;m sure that using zip compression would probably be just as effective. The main benefit comes from not doing the encoding with JavaScript. Because processing it with JavaScript is really slow compared to processing it on the server. Especially in some browsers (read <acronym title="Internet Explorer">IE</acronym>).</p>
<p>I haven&#8217;t really done any optimizing on this site, so there&#8217;s a lot of things I could do. If only I can find the time&#8230; <img src='http://www.svennerberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benco</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-9863</link>
		<dc:creator>Benco</dc:creator>
		<pubDate>Tue, 17 Nov 2009 01:55:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-9863</guid>
		<description>Interesting article, and nicely written. About load times, I am not so sure if polyline encoding really improves performance if you already have zip compression enabled on your server (for example using zlib.output_compression in .htaccess). 

By the way, on your server there are a few things to be optimized, according to YSlow...</description>
		<content:encoded><![CDATA[<p>Interesting article, and nicely written. About load times, I am not so sure if polyline encoding really improves performance if you already have zip compression enabled on your server (for example using zlib.output_compression in .htaccess). </p>
<p>By the way, on your server there are a few things to be optimized, according to YSlow&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wt</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-9260</link>
		<dc:creator>wt</dc:creator>
		<pubDate>Mon, 26 Oct 2009 03:37:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-9260</guid>
		<description>Give me your &#039;road.php&#039; file. Thks!</description>
		<content:encoded><![CDATA[<p>Give me your &#8216;road.php&#8217; file. Thks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: molivier</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-7219</link>
		<dc:creator>molivier</dc:creator>
		<pubDate>Mon, 10 Aug 2009 20:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-7219</guid>
		<description>Thank you for this two great posts about polyline enconding : well explained with full examples and good blog desgin !
In source provided, i think there is a tiny error which seems related to bad Google Documentation.
McClure using Math.Floor for &quot;the Step 2&quot; (http://code.google.com/intl/fr/apis/maps/documentation/polylinealgorithm.html), but the doc says &quot;rounding the result&quot; and provide the exemple
-179.9832104 -&gt; -17998321
With Math.floor, we obtain -17998322.
Another person reported the error in API documentation : http://code.google.com/p/gmaps-api-issues/issues/detail?id=670</description>
		<content:encoded><![CDATA[<p>Thank you for this two great posts about polyline enconding : well explained with full examples and good blog desgin !<br />
In source provided, i think there is a tiny error which seems related to bad Google Documentation.<br />
McClure using Math.Floor for &#8220;the Step 2&#8243; (<a href="http://code.google.com/intl/fr/apis/maps/documentation/polylinealgorithm.html" rel="nofollow">http://code.google.com/intl/fr/apis/maps/documentation/polylinealgorithm.html</a>), but the doc says &#8220;rounding the result&#8221; and provide the exemple<br />
-179.9832104 -&gt; -17998321<br />
With Math.floor, we obtain -17998322.<br />
Another person reported the error in <acronym title="Application Programming Interface">API</acronym> documentation : <a href="http://code.google.com/p/gmaps-api-issues/issues/detail?id=670" rel="nofollow">http://code.google.com/p/gmaps-api-issues/issues/detail?id=670</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ≈ Relations &#8250; links for 2009-04-27</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-3758</link>
		<dc:creator>≈ Relations &#8250; links for 2009-04-27</dc:creator>
		<pubDate>Tue, 28 Apr 2009 00:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-3758</guid>
		<description>[...] Polylines in Google Maps [Part 2] &#124; In usability we trust In part 1 I showed how to use and optimize performance on polylines in Google Maps using Javascript. In this article I will show you how to get even better performance by encoding the polylines on the server. (tags: content tutorial googlemaps jmaps polylines)     This was written by gkamp. Posted on Tuesday, April 28, 2009, at 2:11 am. Filed under Daily Deli. Bookmark the permalink. Follow comments here with the RSS feed. Post a comment or leave a trackback. [...]</description>
		<content:encoded><![CDATA[<p>[...] Polylines in Google Maps [Part 2] | In usability we trust In part 1 I showed how to use and optimize performance on polylines in Google Maps using Javascript. In this article I will show you how to get even better performance by encoding the polylines on the server. (tags: content tutorial googlemaps jmaps polylines)     This was written by gkamp. Posted on Tuesday, April 28, 2009, at 2:11 am. Filed under Daily Deli. Bookmark the permalink. Follow comments here with the <acronym title="Really Simple Syndication">RSS</acronym> feed. Post a comment or leave a trackback. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michael</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-3704</link>
		<dc:creator>michael</dc:creator>
		<pubDate>Fri, 24 Apr 2009 07:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-3704</guid>
		<description>we have polylines with millions of points. we split them all into encoded polylines with max 150 - 250 points. store the encoded strings in the mysql db. after zooming and moving the map we load the needed polylines. sending the data with xml to the client wastes a lot of time for parsing the xml data. create you own format for sending data in &quot;raw mode&quot;. its faster.

http://www.wanderservice-schwarzwald.de  

Use Firefox, IE ist too slow.
 
Our next step are encoded and reduced polylines for each zoom level. Currently zoom ist not available, but it works on all all zoom levels.</description>
		<content:encoded><![CDATA[<p>we have polylines with millions of points. we split them all into encoded polylines with max 150 &#8211; 250 points. store the encoded strings in the mysql db. after zooming and moving the map we load the needed polylines. sending the data with xml to the client wastes a lot of time for parsing the xml data. create you own format for sending data in &#8220;raw mode&#8221;. its faster.</p>
<p><a href="http://www.wanderservice-schwarzwald.de" rel="nofollow">http://www.wanderservice-schwarzwald.de</a>  </p>
<p>Use Firefox, <acronym title="Internet Explorer">IE</acronym> ist too slow.</p>
<p>Our next step are encoded and reduced polylines for each zoom level. Currently zoom ist not available, but it works on all all zoom levels.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: parxier</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-3443</link>
		<dc:creator>parxier</dc:creator>
		<pubDate>Tue, 14 Apr 2009 01:48:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-3443</guid>
		<description>Python port of Mark McClure&#039;s algorithm:
http://project.bycycle.org/browser/spinoffs/glineenc.py
http://wyattbaldwin.com/2007/04/19/google-maps-encoded-polylines/

Any idea on how I can join/split several polylines into one (polycluster :-)) on different zoom levels?</description>
		<content:encoded><![CDATA[<p>Python port of Mark McClure&#8217;s algorithm:<br />
<a href="http://project.bycycle.org/browser/spinoffs/glineenc.py" rel="nofollow">http://project.bycycle.org/browser/spinoffs/glineenc.py</a><br />
<a href="http://wyattbaldwin.com/2007/04/19/google-maps-encoded-polylines/" rel="nofollow">http://wyattbaldwin.com/2007/04/19/google-maps-encoded-polylines/</a></p>
<p>Any idea on how I can join/split several polylines into one (polycluster <img src='http://www.svennerberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) on different zoom levels?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pracus</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-2971</link>
		<dc:creator>pracus</dc:creator>
		<pubDate>Fri, 03 Apr 2009 14:06:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-2971</guid>
		<description>My God!

You would not believe it!
It was the case of PHP parser version. I had early PHP5 which doesn&#039;t support some methods and statements.
Thank you again, Gabriel,, for your help!
Almost whole day lost on searching for the case :(</description>
		<content:encoded><![CDATA[<p>My God!</p>
<p>You would not believe it!<br />
It was the case of <acronym title="Pre-Hypertext Processing">PHP</acronym> parser version. I had early PHP5 which doesn&#8217;t support some methods and statements.<br />
Thank you again, Gabriel,, for your help!<br />
Almost whole day lost on searching for the case <img src='http://www.svennerberg.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-2967</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Fri, 03 Apr 2009 12:38:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-2967</guid>
		<description>&lt;strong&gt;&lt;em&gt;@Will Chapman:&lt;/em&gt;&lt;/strong&gt;  I have no experience myself of working with spatial data in mySql but I know that it&#039;s possible to store the data as a geometric object (&lt;a href=&quot;#comment-783&quot; rel=&quot;nofollow&quot;&gt;read Joseph Lust&#039;s comment&lt;/a&gt;) and I suppose that there are methods to merge several geometric objects. 

What I do have experience of is doing that same thing on SQL Server 2008. By using the method &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb933850.aspx&quot; rel=&quot;nofollow&quot;&gt;STUnion()&lt;/a&gt; I&#039;ve been able to merge several polylines into one.

&lt;strong&gt;&lt;em&gt;@pracus:&lt;/em&gt;&lt;/strong&gt; I&#039;m sorry but i can&#039;t reproduce your error. Are you sure you&#039;re using the right polylineEncoder? Maybe if you can email your files I can take a look at it.</description>
		<content:encoded><![CDATA[<p><strong><em>@Will Chapman:</em></strong>  I have no experience myself of working with spatial data in mySql but I know that it&#8217;s possible to store the data as a geometric object (<a href="#comment-783" rel="nofollow">read Joseph Lust&#8217;s comment</a>) and I suppose that there are methods to merge several geometric objects. </p>
<p>What I do have experience of is doing that same thing on <acronym title="Structured Query Language">SQL</acronym> Server 2008. By using the method <a href="http://msdn.microsoft.com/en-us/library/bb933850.aspx" rel="nofollow">STUnion()</a> I&#8217;ve been able to merge several polylines into one.</p>
<p><strong><em>@pracus:</em></strong> I&#8217;m sorry but i can&#8217;t reproduce your error. Are you sure you&#8217;re using the right polylineEncoder? Maybe if you can email your files I can take a look at it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pracus</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-2965</link>
		<dc:creator>pracus</dc:creator>
		<pubDate>Fri, 03 Apr 2009 11:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-2965</guid>
		<description>I&#039;m sorry. It cut a part of example.php source before. It is:

// Include the file containing the class
include(&quot;polylineEncoder.php&quot;);

// Create a nested array containing the coordinates
$points = array(
	array(
		59.6919,
		17.8582
	),
	array(
		59.3030,
		18.0395
	),
	array(
		58.9789,
		17.5341
	)
);

// Create a new instance of PolylineEncoder and supply the array
// as an argument to the constructor
$polylineEncoder = new PolylineEncoder($points);

// Encode the coordinates by calling dpEncode(), it returns an array containing the
// encoded coordinates and levels.
$encoded_points = $polylineEncoder-&gt;dpEncode();

header(&quot;Status: 200&quot;);
header(&quot;Content-Type: text/html&quot; );
print &quot;Encoded points string: &quot;.$encoded_points[&quot;Points&quot;];</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry. It cut a part of example.php source before. It is:</p>
<p>// Include the file containing the class<br />
include(&#8220;polylineEncoder.php&#8221;);</p>
<p>// Create a nested array containing the coordinates<br />
$points = array(<br />
	array(<br />
		59.6919,<br />
		17.8582<br />
	),<br />
	array(<br />
		59.3030,<br />
		18.0395<br />
	),<br />
	array(<br />
		58.9789,<br />
		17.5341<br />
	)<br />
);</p>
<p>// Create a new instance of PolylineEncoder and supply the array<br />
// as an argument to the constructor<br />
$polylineEncoder = new PolylineEncoder($points);</p>
<p>// Encode the coordinates by calling dpEncode(), it returns an array containing the<br />
// encoded coordinates and levels.<br />
$encoded_points = $polylineEncoder-&gt;dpEncode();</p>
<p>header(&#8220;Status: 200&#8243;);<br />
header(&#8220;Content-Type: text/html&#8221; );<br />
print &#8220;Encoded points string: &#8220;.$encoded_points["Points"];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pracus</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-2964</link>
		<dc:creator>pracus</dc:creator>
		<pubDate>Fri, 03 Apr 2009 11:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-2964</guid>
		<description>Hi!

Do you have any idea what is the reason of such error:
&quot;Parse error: syntax error, unexpected T_ARRAY, expecting &#039;)&#039; in /home/pracus/public_html/minuta_pl/maps/polylineEncoder.php on line 69&quot;
when trying to display this URL: http://minuta8.pl/maps/example.php ?

polylineEncoder.php file contains exactly the same source as your class file upon, no character is changed and example.php contains:

dpEncode();

header(&quot;Status: 200&quot;);
header(&quot;Content-Type: text/html&quot; );
print &quot;Encoded points string: &quot;.$encoded_points[&quot;Points&quot;];
?&gt;

I don&#039;t understand what&#039;s wrong.
Thank you in advance!</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>Do you have any idea what is the reason of such error:<br />
&#8220;Parse error: syntax error, unexpected T_ARRAY, expecting &#8216;)&#8217; in /home/pracus/public_html/minuta_pl/maps/polylineEncoder.php on line 69&#8243;<br />
when trying to display this URL: <a href="http://minuta8.pl/maps/example.php" rel="nofollow">http://minuta8.pl/maps/example.php</a> ?</p>
<p>polylineEncoder.php file contains exactly the same source as your class file upon, no character is changed and example.php contains:</p>
<p>dpEncode();</p>
<p>header(&#8220;Status: 200&#8243;);<br />
header(&#8220;Content-Type: text/html&#8221; );<br />
print &#8220;Encoded points string: &#8220;.$encoded_points["Points"];<br />
?&gt;</p>
<p>I don&#8217;t understand what&#8217;s wrong.<br />
Thank you in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Chapman</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-2938</link>
		<dc:creator>Will Chapman</dc:creator>
		<pubDate>Thu, 02 Apr 2009 20:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-2938</guid>
		<description>I have a mysql table with around 8,000 coords representing the 80 canals and navigable rivers of the UK.

As you can see from http://www.saveourwaterways.info/test.phtml, using the polyline encoder class, the ends of each succeeding waterway joins up to the beginning of the next in sequence.

What I am planning is to draw each of the 80 waterways as a separate polyline but it concerns me that this will mean 80 overlays which suggest to me that it might be sluggish. I wondered if anyone has any ideas how I could insert a start and end point to each waterway so I can use just one layer without them merging with each other?

Cheers


Will</description>
		<content:encoded><![CDATA[<p>I have a mysql table with around 8,000 coords representing the 80 canals and navigable rivers of the UK.</p>
<p>As you can see from <a href="http://www.saveourwaterways.info/test.phtml" rel="nofollow">http://www.saveourwaterways.info/test.phtml</a>, using the polyline encoder class, the ends of each succeeding waterway joins up to the beginning of the next in sequence.</p>
<p>What I am planning is to draw each of the 80 waterways as a separate polyline but it concerns me that this will mean 80 overlays which suggest to me that it might be sluggish. I wondered if anyone has any ideas how I could insert a start and end point to each waterway so I can use just one layer without them merging with each other?</p>
<p>Cheers</p>
<p>Will</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-2024</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Thu, 19 Feb 2009 18:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-2024</guid>
		<description>&lt;strong&gt;&lt;em&gt;Tom von Alten:&lt;/em&gt;&lt;/strong&gt; You&#039;re absolutely right! Thanks for pointing it out! I have now corrected it in the code example.</description>
		<content:encoded><![CDATA[<p><strong><em>Tom von Alten:</em></strong> You&#8217;re absolutely right! Thanks for pointing it out! I have now corrected it in the code example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom von Alten</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-2008</link>
		<dc:creator>Tom von Alten</dc:creator>
		<pubDate>Wed, 18 Feb 2009 22:23:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-2008</guid>
		<description>In line 22 of your first code example, I suppose you mean to have $points rather than $point as the argument to PolylineEncoder()?</description>
		<content:encoded><![CDATA[<p>In line 22 of your first code example, I suppose you mean to have $points rather than $point as the argument to PolylineEncoder()?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anan</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-1746</link>
		<dc:creator>Anan</dc:creator>
		<pubDate>Fri, 06 Feb 2009 04:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-1746</guid>
		<description>Even when I used &quot;PointsLiteral&quot;, I still got incorrect polyline. Why? To insert correctly into MySQL database you need 4 backslashes not just 2. So I add 2 more and happy now :&gt;  Thanks</description>
		<content:encoded><![CDATA[<p>Even when I used &#8220;PointsLiteral&#8221;, I still got incorrect polyline. Why? To insert correctly into MySQL database you need 4 backslashes not just 2. So I add 2 more and happy now :&gt;  Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-1712</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Wed, 04 Feb 2009 09:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-1712</guid>
		<description>&lt;strong&gt;&lt;em&gt;Anan:&lt;/em&gt;&lt;/strong&gt; Hi! The faulty line was still there but commented out. Now I have removed it completely.
Cheers!</description>
		<content:encoded><![CDATA[<p><strong><em>Anan:</em></strong> Hi! The faulty line was still there but commented out. Now I have removed it completely.<br />
Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anan</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-1711</link>
		<dc:creator>Anan</dc:creator>
		<pubDate>Wed, 04 Feb 2009 09:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-1711</guid>
		<description>Hi, thanks for the excellent work. How about the bug fix in #8?
I just download the class and it is still there. 
Thanks</description>
		<content:encoded><![CDATA[<p>Hi, thanks for the excellent work. How about the bug fix in #8?<br />
I just download the class and it is still there.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-1172</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Sat, 03 Jan 2009 15:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-1172</guid>
		<description>&lt;strong&gt;&lt;em&gt;@Timur:&lt;/em&gt;&lt;/strong&gt; I&#039;m happy to hear that you like my post. Contact me through the &lt;a href=&quot;http://www.svennerberg.com/contact/&quot; rel=&quot;nofollow&quot;&gt;contact page&lt;/a&gt; with a vaild e-mail adress and we can talk about it.</description>
		<content:encoded><![CDATA[<p><strong><em>@Timur:</em></strong> I&#8217;m happy to hear that you like my post. Contact me through the <a href="http://www.svennerberg.com/contact/" rel="nofollow">contact page</a> with a vaild e-mail adress and we can talk about it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-1161</link>
		<dc:creator>Timur</dc:creator>
		<pubDate>Fri, 02 Jan 2009 17:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-1161</guid>
		<description>I very liked this post. Can I copy it to my site?
Thanks in advance.

Sincerely, Your Reader.</description>
		<content:encoded><![CDATA[<p>I very liked this post. Can I copy it to my site?<br />
Thanks in advance.</p>
<p>Sincerely, Your Reader.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-832</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Sat, 13 Dec 2008 12:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-832</guid>
		<description>&lt;strong&gt;&lt;em&gt;dompie:&lt;/em&gt;&lt;/strong&gt; I&#039;m glad that you found it useful! :-)</description>
		<content:encoded><![CDATA[<p><strong><em>dompie:</em></strong> I&#8217;m glad that you found it useful! <img src='http://www.svennerberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dompie</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-826</link>
		<dc:creator>dompie</dc:creator>
		<pubDate>Fri, 12 Dec 2008 20:23:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-826</guid>
		<description>Hello, you saved me a lot of work with your excellent polylineencoder php-class. It&#039;s awesome fast and works perfect for me, thanks a lot for your great effort! :)</description>
		<content:encoded><![CDATA[<p>Hello, you saved me a lot of work with your excellent polylineencoder php-class. It&#8217;s awesome fast and works perfect for me, thanks a lot for your great effort! <img src='http://www.svennerberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-787</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Wed, 10 Dec 2008 07:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-787</guid>
		<description>&lt;strong&gt;&lt;em&gt;Joseph:&lt;/em&gt;&lt;/strong&gt; That&#039;s a good idea! I&#039;ve actually implemented support for SqlGeometry in the C# class for a project I&#039;m currently working on where geo data is stored on a SQL Server 2008. But it&#039;s not a part of the class I&#039;ve made publicly available. The reason is that in order to make it work you have to install a few dll&#039;s and add extra references to your project, so for the sake of simplicity I left it out.

I haven&#039;t done anything like that for the PHP-class but it&#039;s a great idea. I will look into it when I find the time.

P.S Mark has made a C# class, I&#039;ve refactored the PHP code. :-) /Gabriel</description>
		<content:encoded><![CDATA[<p><strong><em>Joseph:</em></strong> That&#8217;s a good idea! I&#8217;ve actually implemented support for SqlGeometry in the C# class for a project I&#8217;m currently working on where geo data is stored on a <acronym title="Structured Query Language">SQL</acronym> Server 2008. But it&#8217;s not a part of the class I&#8217;ve made publicly available. The reason is that in order to make it work you have to install a few dll&#8217;s and add extra references to your project, so for the sake of simplicity I left it out.</p>
<p>I haven&#8217;t done anything like that for the <acronym title="Pre-Hypertext Processing">PHP</acronym>-class but it&#8217;s a great idea. I will look into it when I find the time.</p>
<p>P.S Mark has made a C# class, I&#8217;ve refactored the <acronym title="Pre-Hypertext Processing">PHP</acronym> code. <img src='http://www.svennerberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  /Gabriel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Lust</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-783</link>
		<dc:creator>Joseph Lust</dc:creator>
		<pubDate>Wed, 10 Dec 2008 04:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-783</guid>
		<description>Mark, fine work with the PHP class, but one suggestion to make it much more useful. When running storage of map objects in the mySQL/Php world, the geometric object is splendid as it allows built in functions to be run on your tables of data. For instance, run SELECT and sort by length, or area... all from SQL prompt.

While I like the ability to encode the line and improve loading speed for the client, I would of course still store the data in both a geometry object, and encoded string. If you could add an option to your class that would take a mysql geometry object, or linestring, and do the rest from there, it would make it even more useful in the server environment. If not I can still write this for my own implementation, but I think others will like it as well.

Finally, if you have nothing else to do, what better than pull out your hair and build an SQL SP to achieve encoding?

Thanks.</description>
		<content:encoded><![CDATA[<p>Mark, fine work with the <acronym title="Pre-Hypertext Processing">PHP</acronym> class, but one suggestion to make it much more useful. When running storage of map objects in the mySQL/Php world, the geometric object is splendid as it allows built in functions to be run on your tables of data. For instance, run SELECT and sort by length, or area&#8230; all from <acronym title="Structured Query Language">SQL</acronym> prompt.</p>
<p>While I like the ability to encode the line and improve loading speed for the client, I would of course still store the data in both a geometry object, and encoded string. If you could add an option to your class that would take a mysql geometry object, or linestring, and do the rest from there, it would make it even more useful in the server environment. If not I can still write this for my own implementation, but I think others will like it as well.</p>
<p>Finally, if you have nothing else to do, what better than pull out your hair and build an <acronym title="Structured Query Language">SQL</acronym> SP to achieve encoding?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-657</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Wed, 26 Nov 2008 12:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-657</guid>
		<description>The bug is found and fixed! It turned out to be a fairly trivial one having to do with escaping of strings.</description>
		<content:encoded><![CDATA[<p>The bug is found and fixed! It turned out to be a fairly trivial one having to do with escaping of strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-653</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Tue, 25 Nov 2008 14:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-653</guid>
		<description>&lt;strong&gt;&lt;em&gt;markw: &lt;/em&gt;&lt;/strong&gt; Sure! If you contact me through the &lt;a href=&quot;http://www.svennerberg.com/contact/&quot; rel=&quot;nofollow&quot;&gt;contact page&lt;/a&gt; and give me your email I will mail you a trackline.</description>
		<content:encoded><![CDATA[<p><strong><em>markw: </em></strong> Sure! If you contact me through the <a href="http://www.svennerberg.com/contact/" rel="nofollow">contact page</a> and give me your email I will mail you a trackline.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: markw</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-652</link>
		<dc:creator>markw</dc:creator>
		<pubDate>Tue, 25 Nov 2008 12:40:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-652</guid>
		<description>Thanks for the warning! I haven&#039;t spotted the bug yet - can you give me an example trackline that causes the problem and I&#039;ll take a look.</description>
		<content:encoded><![CDATA[<p>Thanks for the warning! I haven&#8217;t spotted the bug yet &#8211; can you give me an example trackline that causes the problem and I&#8217;ll take a look.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Svennerberg</title>
		<link>http://www.svennerberg.com/2008/11/polylines-in-google-maps-part-2/comment-page-1/#comment-651</link>
		<dc:creator>Gabriel Svennerberg</dc:creator>
		<pubDate>Tue, 25 Nov 2008 10:24:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.svennerberg.com/?p=687#comment-651</guid>
		<description>&lt;strong&gt;&lt;em&gt;markw: &lt;/em&gt;&lt;/strong&gt; Nice! I&#039;ve also translated it but I run into a strange bug which I haven&#039;t figured out yet. When I tried your class I see that the same error occurs in that as well. The error is that if the coordinates have more than 4 decimals the polylines get screwed up. I&#039;ve solved it by rounding the decimals to just 4 decimals but that&#039;s not a really good solution. Do you have any idea what might cause this?

Here&#039;s my &lt;a href=&quot;http://www.svennerberg.com/examples/polylines/PolylineEncoder.cs&quot; rel=&quot;nofollow&quot;&gt;PolylineEncoder class&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p><strong><em>markw: </em></strong> Nice! I&#8217;ve also translated it but I run into a strange bug which I haven&#8217;t figured out yet. When I tried your class I see that the same error occurs in that as well. The error is that if the coordinates have more than 4 decimals the polylines get screwed up. I&#8217;ve solved it by rounding the decimals to just 4 decimals but that&#8217;s not a really good solution. Do you have any idea what might cause this?</p>
<p>Here&#8217;s my <a href="http://www.svennerberg.com/examples/polylines/PolylineEncoder.cs" rel="nofollow">PolylineEncoder class</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
