Skip to content

Commit

Permalink
Docs (popup): center the marker on the map example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspermdegroot committed Jul 31, 2012
1 parent 4ed467d commit fede29b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/pages/popup/examples.html
Expand Up @@ -175,7 +175,10 @@ <h3><code>map.html</code></h3>
position: myLatlng,
map: map,
title: "University of Westminster"
});
});
google.maps.event.addListener( map, 'bounds_changed', function() {
map.panTo( myLatlng );
});
}
&lt;/script&gt;
&lt;script src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/popup/map.html
Expand Up @@ -16,7 +16,11 @@
position: myLatlng,
map: map,
title: "University of Westminster"
});
});
// center the map and the marker when the size of the canvas changes
google.maps.event.addListener( map, 'bounds_changed', function() {
map.panTo( myLatlng );
});
}
</script>
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
Expand Down

0 comments on commit fede29b

Please sign in to comment.