On 1 Jun., 00:25, Rossko <[email protected]> wrote:
> > Now, I have tried to combine my code with the example. It still
> > doesn't work,
> > i don't know how to include my code.
> > It looks like this now:http://www.circleeli.webatu.com/circle.html
>
> Works better though, seems to draw a consistent circle as you wish?
>
> Okay, so you create an 'empty' polyline and add it to the map before
> we begin, that's good.
>
> At the first click, you add your 'centre' marker okay, but
>       line.insertVertex(1, point);
> wouldn't it make more sense to add this as the first vertex of your
> line?  I think that would allow the rubber-band effect of the line to
> work properly.  Vertex index starts at 0, vertex 1 is the second.
>
Now, the line on the center is working but it doesn't set the secon
point anymore.
I have combined my old code with the new one. Here is the actual
version:
http://circleeli.webatu.com/circle.html

> After you've got this working, I would guess you want to add some code
> to remove the line after your circle is drawn.
>
Yeah, exactly!
Could I do it with the remove function?

> By the by, you don't need to do this
>    point1 = new GLatLng(point.y, point.x);
> as the 'point' being passed into your click listener is already a
> GLatLng
>    http://code.google.com/apis/maps/documentation/javascript/v2/referenc...
> so all you need to do is
>    point1 = point;
>
Thanks, thats good to know,
but now I have changed the code and i don't have the click listener.
May be I need to change it back.

> > The for loop was just an experience.
>
> I'm sure it was, but if you put bad code into your page it may not do
> what you expect.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en.

Reply via email to