Skip to content

Commit

Permalink
Merge pull request #244 from bartvde/featuremgr-proj
Browse files Browse the repository at this point in the history
We need the featureLayer to always have a projection, otherwise writing ...
  • Loading branch information
bartvde committed Mar 5, 2015
2 parents c9db105 + bedf17a commit 32c5cd3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/script/plugins/FeatureManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,10 @@ gxp.plugins.FeatureManager = Ext.extend(gxp.plugins.Tool, {
var change = this.fireEvent("beforelayerchange", this, layerRecord);
if (change !== false) {
if (layerRecord) {
// do not use getProjection here since we never want to use the
// map's projection on the feature layer
this.featureLayer.projection = layerRecord.getLayer().projection;
// do not use getProjection here
var layerProj = layerRecord.getLayer().projection;
this.featureLayer.projection = (layerProj !== null) ? layerProj :
this.target.mapPanel.map.getProjectionObject();
}
if (layerRecord !== this.layerRecord) {
this.clearFeatureStore();
Expand Down

0 comments on commit 32c5cd3

Please sign in to comment.