[OpenLayers-Users] Does OL have utility function to convert WKB into something usable?

Julien-Samuel Lacroix jlacroix at mapgears.com
Wed Jan 2 12:15:17 EST 2008


Hi,
Sorry to jump late in this one, but did you hear of the Encoded Polyline 
Algorithm Format from the Google Maps API? it transform a polyline into 
a, usually shorter, ascii string.

http://code.google.com/apis/maps/documentation/polylinealgorithm.html

I don't know if there's a licencing restriction on it though.

Some more docs/examples here:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/

Julien

Stephen Woodbridge wrote:
> Tim Schaub wrote:
> 
>>Hey-
>>
>>Stephen Woodbridge wrote:
>>
>>>Hi all,
>>>
>>>Does OL have utility function to convert WKB into something usable?
>>>Searching with google did not show anything appropriate.
>>
>>Reading binary files is problematic cross-browser.  In Firefox, we can 
>>override the mime-type to "text/plain; charset=x-user-defined" and parse 
>>a byte at a time, but this doesn't work in IE.
>>
>>I'd be happy to be told otherwise, but I think the answer is use known 
>>character sets with browsers (not binary files).
> 
> 
> Tim and all who answered,
> 
> Thank you for your responses. It does not seem that any existing tool 
> support this format. It is a binary encoded as a sequence of numbers and 
> should not be too hard to to decode, but after a little more research it 
> turns out that this is NOT more compact than just returning the numbers 
> as I thought it might be. My goal was to find a more compact 
> representation for a route polyline to decrease the bandwidth between 
> the Ajax client and the server.
> 
> I'll probably revisit this later, but other tasks intrude at the moment.
> 
> Thanks and best regards,
>    -Stephen Woodbridge
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/



More information about the Users mailing list