Skip to content
Browse files

New method: refresh

  • Loading branch information...
1 parent 8fc70fe commit b2eaae1bda9e0ac6b5ac877ef43c8c0563997efa @hpneo committed Jun 3, 2012
Showing with 14 additions and 5 deletions.
  1. +4 −0 README.md
  2. +1 −1 examples/static.html
  3. +1 −1 examples/static_markers.html
  4. +1 −1 examples/static_polylines.html
  5. +3 −2 examples/travel_route.html
  6. +4 −0 gmaps.js
View
4 README.md
@@ -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
View
2 examples/static.html
@@ -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({
View
2 examples/static_markers.html
@@ -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({
View
2 examples/static_polylines.html
@@ -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 = [
View
5 examples/travel_route.html
@@ -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(){
@@ -51,6 +51,7 @@
lat: -12.043333,
lng: -77.028333,
zoom: 16,
+ height: '500px',
click: function(e){
map.addMarker({
lat: e.latLng.lat(),
View
4 gmaps.js
@@ -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));

0 comments on commit b2eaae1

Please sign in to comment.
Something went wrong with that request. Please try again.