Thanks alot, I got it working now :) On 16 sep, 16:00, Andrew Leach <[email protected]> wrote: > On Sep 16, 2:51 pm, Stef <[email protected]> wrote: > > > Yes sorry about that, Ive tested both versions, heres the v2 one: > > But you're still doing exactly the same thing. > > location.LatLng is a string: a collection of characters which happens > to comprise digits and a comma. It's NOT two numbers separated by a > comma. > > These lines are very different: > > > var latlng = new google.maps.LatLng(52.370, 4.893); > > var latlng = new google.maps.LatLng(location.LatLng); > > To get the bottom one to work you would need to split the string on > the comma and use the resultant two parts: > > var latlngparts = location.LatLng.split(","); > var latlng = new > google.maps.LatLng(parseFloat(latlngparts[0]),parseFloat(latlngparts[1])); > > Note that latlngparts[0] is a string as well, so you need to convert > it to a number.
-- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
