Instead of geocoding the value, try setting them as a LatLng and the
center on that position.

On Aug 21, 5:17 am, Robbo <[email protected]> wrote:
> Hi Larry,
>
> I have never used this forum before so I am not sure if I should
> "Reply" or "Reply to author" so I will post the same to both.
> Apologies if I have done it incorrectly.
>
> I am at somewhat of a loss as to what I am doing wrong.
>
> 1. The coordinates I used are in degrees, minutes and seconds. If I
> convert to decimal it should be degrees + minutes / 60 + seconds /
> 60 / 60. Using that conversion I come up with decimal coordinates of
> 26.5279944444444 -78.6066805555556. When I punch those into my web
> site it points to the same incorrect land locked location as punching
> in 26 31 40.78 -78 36 24.05. That makes me think that the API and
> functions I am using will accept input in either degrees, minutes and
> seconds or decimals
>
> 2. If I take the non decimal coordinates and punch them into Google
> Earth it points to the right location, a canal in the Bahamas. If I
> punch the decimal coordinates and punch them into Google Earth it
> likewise takes me to the correct location. Clearly Google Earth will
> take coordinates in either format.
>
> 3. The link you sent paints a track from 26 33 5.04 -78 38 3.1188 or
> Decimal 26.5523326,-78.6341996 (the incorrect location) TO 26 31 40.78
> -78 36 24.05 or Decimal 26.5279944444444 -78.6066805555556 (the
> correct location). So the web site you referred me to works correctly
>
> 4. If I punch the coordinates of the incorrect and correct location
> into my web site both of them take me to exactly the same, incorrect
> point.
>
> 5. If I punch both the correct and incorrect coordinates into the
> Tutorial example it points to the wrong place too.
>
> All that leads me to beleive that there's something grossly wrong with
> the code provided in the tutorial and my knowledge of HTML is not good
> enough to find a fix. Please help or let me know where I can turn to
> for help!!!
>
> Robbo
>
> PS following is the HTML Code for the tutorial web site that gives the
> wrong result, if this helps.
>
> <!DOCTYPE html>
> <html>
> <head>
> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
> <title>Google Maps JavaScript API v3 Example: Geocoding Simple</title>
> <link href="http://code.google.com/apis/maps/documentation/javascript/
> examples/standard.css" rel="stylesheet" type="text/css" />
> <script type="text/javascript" src="http://maps.google.com/maps/api/js?
> sensor=false"></script>
> <script type="text/javascript">
>   var geocoder;
>   var map;
>   function initialize() {
>     geocoder = new google.maps.Geocoder();
>     var latlng = new google.maps.LatLng(-34.397, 150.644);
>     var myOptions = {
>       zoom: 8,
>       center: latlng,
>       mapTypeId: google.maps.MapTypeId.ROADMAP
>     }
>     map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>   }
>
>   function codeAddress() {
>     var address = document.getElementById("address").value;
>     geocoder.geocode( { 'address': address}, function(results, status)
> {
>       if (status == google.maps.GeocoderStatus.OK) {
>         map.setCenter(results[0].geometry.location);
>         var marker = new google.maps.Marker({
>             map: map,
>             position: results[0].geometry.location
>         });
>       } else {
>         alert("Geocode was not successful for the following reason: "
> + status);
>       }
>     });
>   }
> </script>
> </head>
> <body onload="initialize()">
>   <div>
>     <input id="address" type="textbox" value="Sydney, NSW">
>     <input type="button" value="Geocode" onclick="codeAddress()">
>   </div>
> <div id="map_canvas" style="height:90%"></div>
> </body>
> </html>
>
> On Aug 21, 8:18 am, "[email protected]" <[email protected]>
> wrote:
>
>
>
> > On Aug 20, 5:06 pm, Robbo <[email protected]> wrote:
>
> > > I have created my web site using the code in the tutorials. I tested
> > > in in Western Australia and it appeared to work fine so I posted it to
> > > my web site. Overnight a user from the Bahamas tried it, to track his
> > > boat, and reported a gross difference in positioning between my web
> > > site and Google Earth. Google Earth is correct. My web site 
> > > iswww.solutionscentre.net.au/mapsandthewrong coordinates are 26 31
> > > 40.78 -78 36 24.05
>
> > > Can anyone help me figure out what I need to do to get it working
> > > properly?
>
> > Where is it supposed to be?
>
> > I have to ask, are you expecting the API to take coordinates in a
> > format other than decimal degrees?
>
> >http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=FQ0olQEdKCNQ...
>
> >   -- Larry
>
> > > Robbo- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to