Skip to content

Commit

Permalink
Merge pull request #955 from camptocamp/mobile-statefulmap
Browse files Browse the repository at this point in the history
Mobile: use map extent center if map center has not been set
  • Loading branch information
asaunier committed May 23, 2014
2 parents 6262ed3 + 70de911 commit 8215308
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,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 8215308

Please sign in to comment.