On Nov 5, 12:33 am, Esa <
esa.ilm...@gmail.com> wrote:
> On Nov 5, 1:47 am, "Michael Ring" <
michaeljr...@gmail.com> wrote:
>
> > Every time you add a marker to the map, add it to the array:
>
> Right, but I meant markers and polylines created and added by
> DirectionsRenderer().
>
> Nevermind, I just decided that the only way to have full access to
> those is to write a custom directionsRenderer. I think Google people
> also encourage that by splitting directions to separate service and
> renderer objects.
>
> @ Bratliff. You probably have something similar in mind because I can
> see that you already decode the polylines. I was going to borrow the
> decoder from Google Polyline Utilityhttp://
code.google.com/apis/maps/documentation/polylineutility.html
> Your decoder looks more sophisticated. Is it explained anywhere.
Clearly, a "backdoor" "fromEncoded" method does exist but I believe
Google has made the right decision to not release it. It is a
horrible kludge which Google would have had to support indefinitely.
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/140a06c9a7441c84/8bb2955c99dc704b
You are welcome to use the following poly decoder:
www.polyarc.us/polyextract.js
Unfortunately, every point must be passed into "new google.maps.LatLng
()" which adds a lot overhead. Google could offer an alternate call
using an array of {x:,y:} objects.
I might do something with PolyCluster which is designed for multiple
polys without multiple OverlayView instances.