On Nov 16, 12:43 pm, Yellow Lemon <[email protected]> wrote:
> Did not understand anything :(

Read this and make you map variable global:
Javascript Concepts: Scope
http://econym.org.uk/gmap/scope.htm

Change this:
function initialize() {
var map = ...

to:
var map = null;
function initialize() {
    map = ...

then this call (which executes in the global context) will work:
<span onclick="map_canvas.setCenter(new
google.maps.LatLng(37.020098,-92.373047));map.setZoom(4);"
style="cursor: pointer;">Title</span>

  -- Larry

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