changeset 22:60f6493e2892

Added projection property to djol/VectorStore
author cin
date Wed, 06 Dec 2017 11:48:39 +0300
parents 7c22fc01fcec
children 1d72fddc319a
files src/djol/VectorStore.js
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/djol/VectorStore.js	Thu Nov 30 11:01:22 2017 +0300
+++ b/src/djol/VectorStore.js	Wed Dec 06 11:48:39 2017 +0300
@@ -33,6 +33,8 @@
             null, {
                 _source: null, // ol3.source.Vector
 
+                _projection: null,
+
                 _subscriptions: null,
 
                 constructor: function (opts) {
@@ -45,12 +47,18 @@
                     var me = this;
 
                     me._source = opts.source;
+                    if (opts.projection)
+                        me._projection = ol.proj.get(opts.projection);
                 },
 
                 getSource: function () {
                     return this._source;
                 },
 
+                getProjection: function() {
+                    return this._projection;
+                },
+
                 get: function (id) {
                     return this._source.getFeatureById(id);
                 },