Just to be clear, you don't have to use Google's page to encode the polyline. I only referenced it here because it is a good implementation of the Douglas-Peucker line encoding algorithm. Feel free to implement the algorithm yourself as described here:<div>
<br></div><div><a href="http://code.google.com/apis/maps/documentation/utilities/polylinealgorithm.html">http://code.google.com/apis/maps/documentation/utilities/polylinealgorithm.html</a><br><br><div class="gmail_quote">
On Sat, Aug 13, 2011 at 3:05 PM, Ian Dees <span dir="ltr"><<a href="mailto:ian.dees@gmail.com">ian.dees@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<div><br></div><div>I just pushed a change to <a href="http://jxapi.osm.org" target="_blank">jxapi.osm.org</a> to support polygon-based data queries.</div><div><br></div><div>Basically, encode your polygon with Google's encoder utility [0] and replace any bbox=? XAPI predicate with a poly=? predicate with the encoded string on the right side.</div>
<div><br></div><div>Let me know if you run into any bugs or problems. Happy Saturday!</div><div>Ian</div><div><br></div><div>[0] <a href="http://code.google.com/apis/maps/documentation/utilities/polylineutility.html" target="_blank">http://code.google.com/apis/maps/documentation/utilities/polylineutility.html</a></div>
</blockquote></div><br></div>