Skip to content

Commit

Permalink
make sure both latitude and longitude are set
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Apr 9, 2014
1 parent 803857a commit 6b97a88
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions google-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@
zoom: this.zoom,
mapTypeId: this.mapType
});
if (this.latitude && this.longitude) {
this.updateCenter();
}
this.showCenterMarkerChanged();
this.updateCenter();
this.fire('google-map-ready');
},
resize: function() {
Expand All @@ -102,7 +99,7 @@
}
},
updateCenter: function() {
if (!this.map) {
if (!this.map || !this.latitude || !this.longitude) {
return;
}
this.map.setCenter(
Expand Down

0 comments on commit 6b97a88

Please sign in to comment.