I don't think that duplicating the last point makes it a valid polygon. I realize that this is happening, but i'm not sure if the API is specifically trying to make a valid polygon or if it was an arbitrary decision made by Google to accommodate for this scenario, in which case I will need to manually validate the polygon to make sure it is at least a triangle.
It doesn't make sense to me because the user has only clicked 3 points and the result now has 4 points. Thanks jp On Jun 19, 9:13 am, Andrew Leach <[email protected]> wrote: > On Jun 19, 1:59 pm, jp <[email protected]> wrote: > > > What do you mean by this? > > Do you think this is a legitimate issue? > > In Chrome, drawing a triangle I get this: > 0: -107.666015625,48.10743118848038 > 1: -95.2734375,56.12106042504407 > 2: -86.220703125,48.10743118848038 > 3: -107.666015625,48.10743118848038 > > Drawing just a line, I get this (which I think is what you're > complaining of): > 0: -106.611328125,46.73986059969267 > 1: -91.318359375,53.592504809039376 > 2: -106.611328125,46.73986059969267 > 3: -106.611328125,46.73986059969267 > > This is legitimate and not a bug. A polygon must have a minimum of > three sides (four vertices for a closed shape), or it's not a polygon. > The API is making sure that you are constructing a valid polygon. If > you just want to draw a line, draw a line. > > Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
