Ah, you star - works perfectly =) I think the problem is occuring with the fact that the script we use to get the long/lat values, actually has them mixed up :D I'll correct that, and then all should be fine :)
Thanks again guys Cheers Andy On Feb 17, 7:25 pm, "[email protected]" <[email protected]> wrote: > On Feb 17, 9:27 am, youradds <[email protected]> wrote: > > > @Marco - sorry, didn't think it would really matter for such a short > > bit of code ;) (not like its 100's of lines!) > > > Either way, here it is: > > >http://ultradev.com.nmsrv.com/test_map.html > > That page currently includes this line: > map.addOverlay(new GMarker("-0.1263427734375","51.47625114982365")) > > Which is incorrect. The first arguement for GMarker is a GLatLng, not > a string. The second argument is not a string either. > > Try: > map.addOverlay(new GMarker(new > GLatLng(-0.1263427734375,51.47625114982365))); > > (and reading the documentation or looking at the working examples in > Mike Williams' tutorial) > > -- Larry > > > > > @Rossko - I've tried the long/lat values both ways, neither get the > > correct location (yet on google earth it does... and also the > > "location selector" thing I use, based on this > > script:http://conversationswithmyself.com/googleMapDemo.html-it seems to > > get the right values, so I expect its something weird going on in my > > code that I'm not expecting :( > > > TIA! > > > Andy > > > On Feb 17, 5:16 pm, Marcelo <[email protected]> wrote: > > > > On Feb 17, 6:12 pm, youradds <[email protected]> wrote: > > > > > Hi, > > > > > Got a bit of a weird one here :/ > > > > > This code: > > > > Is ignored! > > > > Please read and follow the group's posting > > > guidelines:http://groups.google.com/group/Google-Maps-API/web/suggested-posting-...... > > > > -- > > > Marcelo -http://maps.forum.nu > > > -- > > > > > <html> > > > > > <head> > > > > <meta http-equiv="Content-Type" content="text/html; > > > > charset=windows-1252"> > > > > <title>New Page 32</title> > > > > </head> > > > > > <body> > > > > > <script > > > > src="http://maps.google.com/maps?file=api&v=2&hl=en&key=" > > > > type="text/javascript"></script> > > > > > <style>.gmap { > > > > margin: 0px; > > > > padding: 0px; > > > > } > > > > > .middleColumn { > > > > margin: 0px; > > > > padding: 0px; > > > > }</style> > > > > > <div align="center" > > > > style="padding: 10px 10px 10px 10px;"> > > > > > <div > > > > id="map_canvas" style="width: 500px; height: 300px" > > > > class="gmap display"></div> > > > > > </div> > > > > > <script > > > > type="text/javascript"> > > > > > if > > > > (GBrowserIsCompatible()) { > > > > var map > > > > = new GMap2(document.getElementById("map_canvas")); > > > > > > > > map.setCenter(new GLatLng(-0.1263427734375,51.47625114982365), > > > > 5); > > > > > > > > > map.setUIToDefault(); > > > > > > > > map.setMapType(G_HYBRID_MAP); > > > > > > > > > map.addOverlay(new > > > > GMarker("-0.1263427734375","51.47625114982365")); > > > > > } > > > > > </script> > > > > > </body> > > > > > </html> > > > > > ...*should* show London as the center point... yet it doesn't ... its > > > > showing somewhere in Ethiopia for me. > > > > > The long/lat values look right, so I'm a bit confused as to whats > > > > going on. > > > > > Any ideas? Been going around in circles for the last hour or so trying > > > > to work this out :( > > > > > TIA > > > > > Andy- 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.
