Skip to content

Commit b2eaae1

Browse files
committed
New method: refresh
1 parent 8fc70fe commit b2eaae1

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Visit the examples in [hpneo.github.com/gmaps](http://hpneo.github.com/gmaps/)
88
Changelog
99
---------
1010

11+
0.1.12.3
12+
-----------------------
13+
* New method: refresh
14+
1115
0.1.12.2
1216
-----------------------
1317
* New options in GMaps constructor: width and height

examples/static.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
88
<script src="../gmaps.js"></script>
99
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
10-
<link href="examples.css" />
10+
<link rel="stylesheet" type="text/css" href="examples.css" />
1111
<script>
1212
$(document).ready(function(){
1313
var url = GMaps.staticMapURL({

examples/static_markers.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
88
<script src="../gmaps.js"></script>
99
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
10-
<link href="examples.css" />
10+
<link rel="stylesheet" type="text/css" href="examples.css" />
1111
<script>
1212
$(document).ready(function(){
1313
var url = GMaps.staticMapURL({

examples/static_polylines.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
88
<script src="../gmaps.js"></script>
99
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
10-
<link href="examples.css" />
10+
<link rel="stylesheet" type="text/css" href="examples.css" />
1111
<script>
1212
$(document).ready(function(){
1313
var path = [

examples/travel_route.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
88
<script src="../gmaps.js"></script>
99
<link href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
10-
<link type="text/css" href="examples.css" />
11-
<script>
10+
<link rel="stylesheet" type="text/css" href="examples.css" />
11+
<script type="text/javascript">
1212
var map;
1313
var route;
1414
$(document).ready(function(){
@@ -51,6 +51,7 @@
5151
lat: -12.043333,
5252
lng: -77.028333,
5353
zoom: 16,
54+
height: '500px',
5455
click: function(e){
5556
map.addMarker({
5657
lat: e.latLng.lat(),

gmaps.js

+4
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ var GMaps = (function($) {
159159
buildContextMenu('map', e);
160160
});
161161

162+
this.refresh = function() {
163+
google.maps.event.trigger(this.map, 'resize');
164+
};
165+
162166
// Map methods
163167
this.setCenter = function(lat, lng, callback) {
164168
this.map.panTo(new google.maps.LatLng(lat, lng));

0 commit comments

Comments
 (0)