Skip to content

Commit

Permalink
Mobile: use map extent center if map center has not been set
Browse files Browse the repository at this point in the history
  • Loading branch information
asaunier committed May 20, 2014
1 parent 83413c0 commit 70de911
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Ext.define('App.plugin.StatefulMap', {
},

update: function() {
var center = this.getMap().getCenter();
var center = this.getMap().getCenter() || new OpenLayers.Bounds(this.getMap().extent).getCenterLonLat();
var main = App.app.getController('Main');
var layers = main.getOverlay() && main.getOverlay().params.LAYERS || [];
this.setState({
Expand Down

0 comments on commit 70de911

Please sign in to comment.