Friday, August 13, 2010

Re: Help with code

On Aug 13, 3:22 pm, Fraser <fraser.dick...@googlemail.com> wrote:
>
> the line mentioned ********* is where i am getting errors is this the
> correct way to access my array of lat lons ?

No.

For/in is used to enumerate properties of an object. An array is an
Array object, but you can't necessarily enumerate its elements as
properties. And prototype.js has been known to do horrible things
which can break for/in as well.

The foolproof way is "for (i=0;i<points.length;i++)" so that points[i]
does use i as a counter index and points[i] is a GLatLng element in
the array.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate