Skip to content

Commit

Permalink
fix(olHelpers.js, layersSpec.js): passing projection code instead of …
Browse files Browse the repository at this point in the history
…projection object, while converting the geojson data to vector feature (#298)
  • Loading branch information
sathishatnet authored and juristr committed Jul 25, 2016
1 parent 1a5cdca commit c14203f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/services/olHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $

var features = geojsonFormat.readFeatures(
source.geojson.object, {
featureProjection: projectionToUse,
dataProjection: dataProjection
featureProjection: projectionToUse.getCode(),
dataProjection: dataProjection.getCode()
});

oSource.addFeatures(features);
Expand Down
4 changes: 2 additions & 2 deletions test/unit/layersSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ describe('Directive: openlayers layers', function() {
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [434179, 122450] // Southampton (UK) in EPSG:27700
coordinates: [50.909698, -1.404351] // Southampton (UK) in EPSG:4326
}
},
projection: 'EPSG:27700'
projection: 'EPSG:4326'
}
}
};
Expand Down

0 comments on commit c14203f

Please sign in to comment.