I changed the code to map.addOverlay(new GMarker(new GLatLng(41.7934,
-113.52325))); and it works.
My javascript manual is packed in a moving box somewhere isn't there a
function in the API to deal with the number text number issue? Or is
there a function to pass GLatLng an array?

Thanks


On Dec 26, 3:23 pm, Marcelo <[email protected]> wrote:
> On Dec 26, 10:42 pm, kangus <[email protected]> wrote:
>
> > This is the one line that dies:
> > map.addOverlay(new GMarker(new GLatLng(41.7934, -113.52325)));
>
> Your sample page does not have that line in it.
> Please post a link to a page that demonstrates the problem, as
> requested in the posting guidelines, and not to a "similar" page.
>
> Instead, your page has:
>  map.addOverlay(new GMarker(new GLatLng(block[0][i]+', '+block[1]
> [i])));
>
> ... which is not the same. If you can't see why, then I'd suggest that
> you find a javascript tutorial and read about the difference between
> numbers and strings, as well as string concatenation, which is outside
> of the scope of this group.
>
> --
> Marcelo -http://maps.forum.nu
> --
>
>
>
> > no array, just a position.
>
> > On Dec 25, 1:42 pm, Andrew Leach <[email protected]>
> > wrote:
>
> > > On Dec 25, 8:15 pm, kangus <[email protected]> wrote:
>
> > > > Why do I get an error on line 141 from the maps2.api main.js telling
> > > > me I have an invalid argument?
>
> > > Because GLatLng() takes two numeric arguments, and you are giving it a
> > > string with a comma in it as the first argument and nothing as the
> > > second.
>
> > > What you have is the equivalent of
> > > map.addOverlay(new GMarker(new GLatLng("41.7934, -113.52325")));
> > > and you should have
> > > map.addOverlay(new GMarker(new GLatLng(41.7934, -113.52325)));
>
> > > Investigate split() and parseFloat(); or make each block[] element
> > > into an array itself:
> > > block[0]=[41.7934, -113.52325];
> > > so that you can use block[i][0],block[i][1].
>
> > > Andrew- Hide quoted text -
>
> - Show quoted text -

--

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