On Dec 26, 4:42 pm, kangus <[email protected]> wrote: > Third try at replying! > on the first try I included links the second try I copied a broken > array but without links to which I recieved an email telling me to > read the rules. > > so forget the code and the data:http://dovecreek.us/jtest.html
Seems to work for me. > > This is the one line that dies: > map.addOverlay(new GMarker(new GLatLng(41.7934, -113.52325))); > 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 -- 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.
