Read the posting guidelines, please supply  a link to the application if you
want help.

2010/5/18 Popovich <[email protected]>

> Hi.
> I am trying to implement google maps system but it only shows a grey
> area.
> The address is generated from the database.
>
> Here is my js code:
> $(document).ready(function()
> {
>    geocoder = new google.maps.Geocoder();
>
>     var address = document.getElementById('address').innerHTML;
>     alert(address);
>    if (geocoder) {
>      geocoder.geocode( {'address': address,'region':'pt'},
> function(results, status) {
>          alert(status);
>        if (status == google.maps.GeocoderStatus.OK) {
>          map = new google.maps.Map(document.getElementById("map"));
>          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);
>        }
>      });
>    }
>
> });
>
> The code shows status OK also if a alert results[0].geometry.location
> it shows values but the map is not drawn.
> What i am doing wrong.
>
> --
> 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]<google-maps-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
>
>


-- 
Bjorn Brala
----------------
www.GeoStart.nl/english/ - Google maps - Swis Webdesign
www.twitter.com/bbrala

-- 
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