You need to pass a googe.maps.LatLng object to the setCenter method:
function updateMap()
{
var lat = 24.730110212044263;
var lng = 46.65211200714111;
var myLatLng=new google.maps.LatLng(lat, lng);
var zoom = 15;
map.setZoom(zoom);
map.setCenter(myLatLng);
}
Martin.
On Dec 24, 5:01 am, Mesh3L <[email protected]> wrote:
> Thank you all for the replies.
>
> I'm very newbie in JavaScript and Google API.
>
> That's what i have done regarding my topic. But it does nothing !
>
> I'm using these values just for testing
>
> function updateMap()
>
> {
>
> var lat = 24.730110212044263;
> var lng = 46.65211200714111;
> var zoom = 15;
>
> map.setZoom(zoom);
> map.setCenter(lat,lng);
>
> }
>
> and for the menu :
>
> <select name="city" id="city" class="wide" onChange="updateMap()" >
>
> What's wrong ?
--
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.