Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
New method: refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
hpneo committed Jun 3, 2012
1 parent 8fc70fe commit b2eaae1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -8,6 +8,10 @@ Visit the examples in [hpneo.github.com/gmaps](http://hpneo.github.com/gmaps/)
Changelog
---------

0.1.12.3
-----------------------
* New method: refresh

0.1.12.2
-----------------------
* New options in GMaps constructor: width and height
Expand Down
2 changes: 1 addition & 1 deletion examples/static.html
Expand Up @@ -7,7 +7,7 @@
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="../gmaps.js"></script>
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
<link href="examples.css" />
<link rel="stylesheet" type="text/css" href="examples.css" />
<script>
$(document).ready(function(){
var url = GMaps.staticMapURL({
Expand Down
2 changes: 1 addition & 1 deletion examples/static_markers.html
Expand Up @@ -7,7 +7,7 @@
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="../gmaps.js"></script>
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
<link href="examples.css" />
<link rel="stylesheet" type="text/css" href="examples.css" />
<script>
$(document).ready(function(){
var url = GMaps.staticMapURL({
Expand Down
2 changes: 1 addition & 1 deletion examples/static_polylines.html
Expand Up @@ -7,7 +7,7 @@
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="../gmaps.js"></script>
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
<link href="examples.css" />
<link rel="stylesheet" type="text/css" href="examples.css" />
<script>
$(document).ready(function(){
var path = [
Expand Down
5 changes: 3 additions & 2 deletions examples/travel_route.html
Expand Up @@ -7,8 +7,8 @@
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="../gmaps.js"></script>
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
<link type="text/css" href="examples.css" />
<script>
<link rel="stylesheet" type="text/css" href="examples.css" />
<script type="text/javascript">
var map;
var route;
$(document).ready(function(){
Expand Down Expand Up @@ -51,6 +51,7 @@
lat: -12.043333,
lng: -77.028333,
zoom: 16,
height: '500px',
click: function(e){
map.addMarker({
lat: e.latLng.lat(),
Expand Down
4 changes: 4 additions & 0 deletions gmaps.js
Expand Up @@ -159,6 +159,10 @@ var GMaps = (function($) {
buildContextMenu('map', e);
});

this.refresh = function() {
google.maps.event.trigger(this.map, 'resize');
};

// Map methods
this.setCenter = function(lat, lng, callback) {
this.map.panTo(new google.maps.LatLng(lat, lng));
Expand Down

0 comments on commit b2eaae1

Please sign in to comment.