Hi, i have a little problem but i think is a javascript knowledge
problem:

I normally use Java, so I think will be a good idea define an "object"
like parallelPolyline that is a "child" of google.maps.polyline.
I try to find how do something like "extends" in Java because i need
only to add a parameter and re-write a method.

I know that javascript isn't java, but you know if is possible? Any
usefull link?

Thank!

On 8 jul, 12:56, Enrico <[email protected]> wrote:
> The sample that i find is made using v2 of API.
> I want to try to rewrite it for v3 because i like the idea of an
> object child of parallel line but with the possibility to add an
> offset to paint like a parallel of other poly.
> I think to add something to change the thickness with the zoom.
> I will try it to see results in velocity and effects
>
> thank for help!
>
> On 8 jul, 12:43, Ben Appleton <[email protected]> wrote:
>
>
>
> > In traffic they use parallel lines, but these are rendered as image tiles by
> > a server.  I would be curious to see how fast parallel lines could be in
> > javascript.  You may want to try changing your polyline coordinates on map
> > event zoom_changed.
>
> > On 8 Jul 2010 19:38, "Enrico" <[email protected]> wrote:
>
> > > Thank you for your fast reply Ben,
>
> > > I think that the solution of black poly is easy but I try it in a
> > > small page that I have in local to pick the coords of polyline paths,
> > > and when I have a closest zoom the two lines are too far and not seem
> > > a two directions streets. furthermore if i use a large zoom, they
> > > merge into 1 (and the black separator is over the only that I see).
>
> > > I see that it's possible to trigger the change zoom level on map, so I
> > > think to control it and change the thickness of lines or change the
> > > offset, but y have a lot of small polyline (like traffic, each one
> > > with different color) and i must change all. I think in an array of
> > > polyline and a for to change alls, but it seems a very expansive
> > > process...
>
> > > I just find an example of drawing parallel lines (http://
> > > wtp2.appspot.com/ParallelLines.htm) and I think that i can use the
> > > alghoritm to calculate the coords of one of two polylines every time
> > > that i change zoom. I think it can work but it seems more expansive
> > > that the other.
>
> > > In traffic seems that they use polygons, not polyline, but seems that
> > > they can control the thickness.
> > > Any idea?
>
> > > Thank!
>
> > > On 8 jul, 10:50, Ben Appleton <[email protected]> wrote:
> > >> It sounds like you need your 2 Polylines to stay a minimum distance apart
> > as
> > >> you zoom out, so they don't merge into 1 line.  A simple hack would be to
> > >> render a thin opaque black Polyline down the middle of the road with a
> > >> higher zIndex - that would divide the 2 Polylines.  Another alternative
> > >> would be to offset the 2 Polylines in JS, but that would be complex and
> > >> slower.
>
> > >> Good luck!
> > >> Ben
>
> > >> On 8 Jul 2010 18:28, "Enrico" <[email protected]> wrote:
> > >> Hi,
> > >> I start to play with API v3 and I have a conceptual problem:
> > >> I need something like traffic overlay but with own data.
> > >> Basically I need to print two line (one for every direction of a
> > >> street) and dynamically change the color.
>
> > >> The main problem is what can I use for this: polyline or polygons?
> > >> - with polyline the thickness of it is the same in every zoom level
> > >> so, if i see two lines in zoom level 8, i see only one on 15 because
> > >> they are overlapped.
> > >> - with polygon on zoom 15 (f.e.) i can't see them because are too
> > >> small (i try to print a path with thickness 1 and printed like a
> > >> street)
>
> > >> I try to understand what use google in traffic but I can't.
>
> > >> Any help?
>
> > >> I will use javascript API v3
>
> > >> Thank!
>
> > >> --
> > >> You received this message because you are subscribed to the Google Groups
> > >> "Google Maps JavaScript API v3" group.
> > >> To post to this group, send email to
>
> > [email protected].>> To unsubscribe from this group, 
> > send email to
> > >> [email protected]<google-maps-js-api-v3%2B
> > >>  [email protected]><google-maps-js-api-v3%2B
>
> > [email protected]>>> .
> > >> For more options, visit this group athttp://
>
> > groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
>
> > "Google Maps JavaScript API v3" group.> To post to this group, send email to
>
> > [email protected].> To unsubscribe from this group, 
> > send email to
>
> > [email protected]<google-maps-js-api-v3%2B 
> > [email protected]>
> > .> For more options, visit this group at
>
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to