I have the same scenario to center the map on the marker and im facing
the same prob. The marker is not getting centered, and the most weird
thing is that the marker is placed on the left corner of the map. here
is the peice of code i have written.
<td><div id="map" style="width: 300px; height: 200px"></div>
<script type="text/javascript">
var map = new
GMap(document.getElementById("map"));
map.checkResize();
map.setCenter(new
GLatLng(17.502030, 78.382801), 13);
var marker = new GMarker(new
GLatLng(17.502030, 78.382801));
map.addOverlay(marker);
</script></td>
More over the same code is NOT working for FireFox too.
On Oct 12, 4:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Oct 11, 3:41 pm, bejitto101 <[EMAIL PROTECTED]> wrote:
>
> > Here's a link to the page with the
> > issue:http://bellevue.com/restaurant.php?id=1
>
> > It should center on the marker that is farther up and right.
>
> It works OK in IE6 and Opera...
> In FF3 and Chrome, it isnotcentered correctly. It looks to me like
> Firefox and Chrome are confused about the size of your map. It looks
> like the css that sets the map div's size isnotbeing correctly
> interpreted.
>
> -- Larry
>
>
>
> > Its odd, if I add an alert() right before I initialize the map,
> > everything works fine.
>
> No it isn't. AJAX is asynchronous (Asynchronous Javascript And
> Xml...)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---