Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

93399 vulnerabilities fix #407

Open
wants to merge 75 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
decc786
Added wrapX attribute to source object for each type
Nov 6, 2015
6315c59
Changes did for olHelpers to get in use of wrapX attribute for single…
Nov 6, 2015
13b697f
added dist/ to .gitignore to give pullrequest
Nov 6, 2015
707abda
deleted dist folder for pull request
Nov 6, 2015
36f6ac2
added check condtion undefined wrapX
Nov 6, 2015
13001ac
For project specific
Nov 6, 2015
241e127
update 'undefined' to undefined in olHelpers.js
Nov 6, 2015
994da42
dist/angular opne layers css file
Nov 6, 2015
5414ff6
Include version
supersonicclay Dec 16, 2015
4fc3c3d
Added dist files
supersonicclay Jan 4, 2016
3fb1e0b
Merge remote-tracking branch 'clay/master'
supersonicclay Jan 4, 2016
d2d83dd
Upgrade it to Openlayers 12
Jan 12, 2016
faa71ca
enhanced commonjs compatibility
Jan 12, 2016
27e894f
First build after commonjs code correction
Jan 12, 2016
502052b
modified to return the angular-openlayers-directive module instead of…
Jan 13, 2016
b76b3b9
WKT Geometry Format Support Included.
Jan 13, 2016
99b12e3
Merge remote-tracking branch 'dharani/master'
Jan 18, 2016
7e001ea
Merge remote-tracking branch 'owner/master'
Feb 9, 2016
1a169e7
Merged with master
Feb 9, 2016
607debd
unpin from angular 1.4.8
ChrisHambleton Apr 25, 2016
02892b5
Merge pull request #2 from chambleton/update-angular
sathishatnet Apr 26, 2016
84ef2fe
Updated openlayer to 3.14 version
May 13, 2016
98eefb5
Update CONTRIBUTING.md
sathishatnet Jun 15, 2016
0ff80c0
Merge remote-tracking branch 'owner/master'
Jul 18, 2016
b319862
Added code to have different projection for TileWMS as optional
Jul 19, 2016
259d623
Fix the projection value - GeoJSON and WKT Data
Jul 19, 2016
8817d50
Fix the WKT projection
Jul 19, 2016
76d4db6
Merge remote-tracking branch 'owner/latest' into latest
Jul 21, 2016
7043698
fix(olHelpers.js, layersSpec.js): passing projection code instead of …
Jul 21, 2016
b35f8f2
fix(view.js, center.js) : unregistering map events on scope destroy f…
Jul 22, 2016
b2676fc
memory leak compiled version
Jul 22, 2016
81167e3
fix(view.js, center.js) : unregistering map events on scope destroy f…
Jul 22, 2016
b7e109a
fix(view.js, center.js) : unregistering map events on scope destroy f…
Jul 22, 2016
b38c866
fix(view.js, center.js): Resolve lint issue for the previous commit
Jul 22, 2016
2f82ff0
fix(view.js, center.js): Resolve lint issue of trailing whitespace
Jul 22, 2016
bf109d3
Merge pull request #4 from sathishatnet/TileWMS-projection
sathishatnet Jul 25, 2016
04de95e
Merge pull request #5 from sathishatnet/memoryleakPullRequest
sathishatnet Jul 25, 2016
853f1bd
Merge branch 'memoryLeakRequest'
Jul 25, 2016
7d6fd61
Merge remote-tracking branch 'owner/master'
Jul 25, 2016
11ac2ae
resolved commit issue
Jul 25, 2016
f54d08d
Change to openlayers-prebuilt
supersonicclay Aug 17, 2016
db60bdc
Merge commit '853f1bdf6aa73435b9d2984ccf32a8ef13c58c93'
supersonicclay Aug 18, 2016
acf39b9
Merge remote-tracking branch 'Clay/master'
Nov 11, 2016
d260b65
Merge remote-tracking branch 'origin/latest'
Feb 28, 2017
ac06f61
Lint Issue fixed
sathishatnet Feb 28, 2017
5c299b7
Built Version
sathishatnet Feb 28, 2017
2344b34
Merge branch 'master' into latest
sathishatnet Feb 28, 2017
d87a576
Revert "Merge branch 'master' into latest"
sathishatnet Feb 28, 2017
3f58a88
Merge remote-tracking branch 'origin/master' - 1.19.2
sathishatnet Mar 13, 2017
9d48de9
Generate the dist files for 1.19.2 version
sathishatnet Mar 13, 2017
1f842e1
Updated the Proper version number
sathishatnet Mar 21, 2017
4a42585
fix - set the target element to null to release the html element obje…
sathishatnet Jul 19, 2017
87c6e2a
Merge pull request #7 from sathishatnet/elementMemoryLeak
sathishatnet Jul 19, 2017
eaeed11
fix(layer): set the target element to null to release the html elemen…
sathishatnet Jul 19, 2017
863e038
fix(layer): Added multiple tile urls support for xyz tile source
sathishatnet Aug 3, 2017
fa76ad8
Merge pull request #8 from sathishatnet/xyz-tilelayer-enhancement
sathishatnet Aug 3, 2017
ebf62b7
fix(layer): Added multiple tile urls support for xyz tile source
sathishatnet Aug 3, 2017
f00cd1d
Merge remote-tracking branch 'origin/master'
sathishatnet Mar 6, 2018
7365127
Merge remote-tracking branch 'origin/latest' into latest
sathishatnet Mar 6, 2018
8c3b2df
Synced with Master
sathishatnet Mar 7, 2018
7b0c5a5
Synced with master - second part
sathishatnet Mar 7, 2018
2a8dab8
Removed the Junk file
sathishatnet Mar 7, 2018
8e76819
Removed the compiled output files
sathishatnet Mar 7, 2018
255a256
Synced concat.js file
sathishatnet Mar 7, 2018
4674a1b
Sycned CONTRIBUTING.md file
sathishatnet Mar 7, 2018
17e2897
Synced olHelpers.js file
sathishatnet Mar 7, 2018
4290024
Merge branch 'master' into latest
sathishatnet Mar 7, 2018
0e26d84
ES6 support for Angular module
sathishatnet Mar 8, 2018
562e419
CommonJS - Injecting angular-sanitize to angular module
sathishatnet Mar 8, 2018
edd3927
Common JS Changes - To Support Angular Module
sathishatnet Mar 8, 2018
7e424dd
feat(concat.js): compatibility with commonjs for angular module support
sathishatnet Mar 8, 2018
1fdfebe
Merge branch 'commonjs_angular_support'
sathishatnet Mar 8, 2018
5737a17
Merge branch 'master' into latest
sathishatnet Mar 8, 2018
13cf9f9
Updated angular-sanitize version.
Jun 4, 2020
c6d9170
Updated angular-sanitize version.
Jun 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 36 additions & 21 deletions dist/angular-openlayers-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
if (typeof require === 'function' && typeof exports === 'object') {
// CommonJS
var ol = require('openlayers');
exports.angularOpenlayersDirective = factory(ol);
var ngSanitize = require('angular-sanitize');
module.exports = factory(ol);
} else if (typeof define === 'function' && define.amd) {
// AMD.
define(['ol'], function (ol) {
Expand Down Expand Up @@ -1544,6 +1545,10 @@ angular.module('openlayers-directive').factory('olHelpers', ["$q", "$log", "$htt
wrapX: source.wrapX !== undefined ? source.wrapX : true
};

if (source.projection) {
wmsConfiguration.projection = new ol.proj.get(source.projection);
}

if (source.serverType) {
wmsConfiguration.serverType = source.serverType;
}
Expand Down Expand Up @@ -1705,34 +1710,44 @@ angular.module('openlayers-directive').factory('olHelpers', ["$q", "$log", "$htt

oSource.addFeatures(features);
}

break;

case 'WKT':
if (!(source.wkt) && !(source.wkt.data)) {
if (!(source.wkt || source.url)) {
$log.error('[AngularJS - Openlayers] - You need a WKT ' +
'property to add a WKT format vector layer.');
'property to add a GeoJSON layer.');
return;
}

oSource = new ol.source.Vector();
var wktFormatter = new ol.format.WKT();
var wktProjection; // Projection of wkt data
if (isDefined(source.wkt.projection)) {
wktProjection = new ol.proj.get(source.wkt.projection);
if (isDefined(source.url)) {
oSource = new ol.source.Vector({
format: new ol.format.WKT(),
url: source.url,
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
} else {
wktProjection = projection; // If not defined, features will not be reprojected.
}
oSource = new ol.source.Vector();
var featureProjection = projection;
var wktProjection;
if (isDefined(source.wkt.projection)) {
wktProjection = new ol.proj.get(source.wkt.projection);
} else {
wktProjection = projection;
}

var wktFeatures = wktFormatter.readFeatures(
source.wkt.data, {
featureProjection: projection.getCode(),
dataProjection: wktProjection.getCode()
});
var wktFormat = new ol.format.WKT();
var wktFeatures = [];
for (var k = 0; k < source.wkt.object.length; k++) {
var feature = wktFormat.readFeature(
source.wkt.object[k].data, {dataProjection: wktProjection.getCode() ,
featureProjection: featureProjection.getCode() });
if (source.wkt.object[k].properties) {
feature.properties = source.wkt.object[k].properties;
}
wktFeatures.push(feature);
}
oSource.addFeatures(wktFeatures);
}

oSource.addFeatures(wktFeatures);
break;

case 'JSONP':
if (!(source.url)) {
$log.error('[AngularJS - Openlayers] - You need an url properly configured to add a JSONP layer.');
Expand Down Expand Up @@ -2579,5 +2594,5 @@ angular.module('openlayers-directive').factory('olMapDefaults', ["$q", "olHelper
}
};
}]);

return angular.module('openlayers-directive');
}));
6 changes: 3 additions & 3 deletions dist/angular-openlayers-directive.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/angular-openlayers-directive.min.no-header.js

Large diffs are not rendered by default.

57 changes: 36 additions & 21 deletions dist/angular-openlayers-directive.pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
if (typeof require === 'function' && typeof exports === 'object') {
// CommonJS
var ol = require('openlayers');
exports.angularOpenlayersDirective = factory(ol);
var ngSanitize = require('angular-sanitize');
module.exports = factory(ol);
} else if (typeof define === 'function' && define.amd) {
// AMD.
define(['ol'], function (ol) {
Expand Down Expand Up @@ -1544,6 +1545,10 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
wrapX: source.wrapX !== undefined ? source.wrapX : true
};

if (source.projection) {
wmsConfiguration.projection = new ol.proj.get(source.projection);
}

if (source.serverType) {
wmsConfiguration.serverType = source.serverType;
}
Expand Down Expand Up @@ -1705,34 +1710,44 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $

oSource.addFeatures(features);
}

break;

case 'WKT':
if (!(source.wkt) && !(source.wkt.data)) {
if (!(source.wkt || source.url)) {
$log.error('[AngularJS - Openlayers] - You need a WKT ' +
'property to add a WKT format vector layer.');
'property to add a GeoJSON layer.');
return;
}

oSource = new ol.source.Vector();
var wktFormatter = new ol.format.WKT();
var wktProjection; // Projection of wkt data
if (isDefined(source.wkt.projection)) {
wktProjection = new ol.proj.get(source.wkt.projection);
if (isDefined(source.url)) {
oSource = new ol.source.Vector({
format: new ol.format.WKT(),
url: source.url,
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
} else {
wktProjection = projection; // If not defined, features will not be reprojected.
}
oSource = new ol.source.Vector();
var featureProjection = projection;
var wktProjection;
if (isDefined(source.wkt.projection)) {
wktProjection = new ol.proj.get(source.wkt.projection);
} else {
wktProjection = projection;
}

var wktFeatures = wktFormatter.readFeatures(
source.wkt.data, {
featureProjection: projection.getCode(),
dataProjection: wktProjection.getCode()
});
var wktFormat = new ol.format.WKT();
var wktFeatures = [];
for (var k = 0; k < source.wkt.object.length; k++) {
var feature = wktFormat.readFeature(
source.wkt.object[k].data, {dataProjection: wktProjection.getCode() ,
featureProjection: featureProjection.getCode() });
if (source.wkt.object[k].properties) {
feature.properties = source.wkt.object[k].properties;
}
wktFeatures.push(feature);
}
oSource.addFeatures(wktFeatures);
}

oSource.addFeatures(wktFeatures);
break;

case 'JSONP':
if (!(source.url)) {
$log.error('[AngularJS - Openlayers] - You need an url properly configured to add a JSONP layer.');
Expand Down Expand Up @@ -2579,5 +2594,5 @@ angular.module('openlayers-directive').factory('olMapDefaults', function($q, olH
}
};
});

return angular.module('openlayers-directive');
}));
8 changes: 6 additions & 2 deletions grunt/concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var banner = '(function (root, factory) {\n' +
' if (typeof require === \'function\' && typeof exports === \'object\') {\n' +
' // CommonJS\n' +
' var ol = require(\'openlayers\');\n' +
' exports.angularOpenlayersDirective = factory(ol);\n' +
' var ngSanitize = require(\'angular-sanitize\');\n' +
' module.exports = factory(ol);\n' +
' } else if (typeof define === \'function\' && define.amd) {\n' +
' // AMD.\n' +
' define([\'ol\'], function (ol) {\n' +
Expand All @@ -16,12 +17,15 @@ var banner = '(function (root, factory) {\n' +
' }\n' +
'}(this, function (ol) {\n';

var footer = 'return angular.module(\'openlayers-directive\');' +
'\n}));';

module.exports = function (grunt, options) {
return {
dist: {
options: {
banner: banner,
footer: '\n}));'
footer: footer
},
src: [
'src/directives/openlayers.js',
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"license": "MIT",
"dependencies": {
"angular": "~1.4.8",
"angular-sanitize": "~1.4.8",
"angular-sanitize": "1.7.9",
"openlayers": "4.3.4"
},
"devDependencies": {
Expand Down Expand Up @@ -55,7 +55,9 @@
"phantomjs": "^2.1.0",
"protractor": "~2.5.0",
"publish-latest": "^1.1.2",
"semantic-release": "^4.3.5"
"semantic-release": "^4.3.5",
"bower": "^1.8.8",
"requirejs": "^2.3.6"
},
"scripts": {
"test": "grunt build && grunt karma:unit",
Expand All @@ -67,4 +69,4 @@
},
"main": "dist/angular-openlayers-directive",
"version": "2.1.0"
}
}
62 changes: 37 additions & 25 deletions src/services/olHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $

var esriBaseLayers = ['World_Imagery', 'World_Street_Map', 'World_Topo_Map',
'World_Physical_Map', 'World_Terrain_Base',
'Ocean_Basemap', 'NatGeo_World_Map',
'World_Light_Gray_Base', 'World_Dark_Gray_Base'];
'Ocean_Basemap', 'NatGeo_World_Map'];

var styleMap = {
'style': ol.style.Style,
Expand Down Expand Up @@ -287,6 +286,10 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
wrapX: source.wrapX !== undefined ? source.wrapX : true
};

if (source.projection) {
wmsConfiguration.projection = new ol.proj.get(source.projection);
}

if (source.serverType) {
wmsConfiguration.serverType = source.serverType;
}
Expand Down Expand Up @@ -448,34 +451,44 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $

oSource.addFeatures(features);
}

break;

case 'WKT':
if (!(source.wkt) && !(source.wkt.data)) {
if (!(source.wkt || source.url)) {
$log.error('[AngularJS - Openlayers] - You need a WKT ' +
'property to add a WKT format vector layer.');
'property to add a GeoJSON layer.');
return;
}

oSource = new ol.source.Vector();
var wktFormatter = new ol.format.WKT();
var wktProjection; // Projection of wkt data
if (isDefined(source.wkt.projection)) {
wktProjection = new ol.proj.get(source.wkt.projection);
if (isDefined(source.url)) {
oSource = new ol.source.Vector({
format: new ol.format.WKT(),
url: source.url,
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
} else {
wktProjection = projection; // If not defined, features will not be reprojected.
}
oSource = new ol.source.Vector();
var featureProjection = projection;
var wktProjection;
if (isDefined(source.wkt.projection)) {
wktProjection = new ol.proj.get(source.wkt.projection);
} else {
wktProjection = projection;
}

var wktFeatures = wktFormatter.readFeatures(
source.wkt.data, {
featureProjection: projection.getCode(),
dataProjection: wktProjection.getCode()
});
var wktFormat = new ol.format.WKT();
var wktFeatures = [];
for (var k = 0; k < source.wkt.object.length; k++) {
var feature = wktFormat.readFeature(
source.wkt.object[k].data, {dataProjection: wktProjection.getCode() ,
featureProjection: featureProjection.getCode() });
if (source.wkt.object[k].properties) {
feature.properties = source.wkt.object[k].properties;
}
wktFeatures.push(feature);
}
oSource.addFeatures(wktFeatures);
}

oSource.addFeatures(wktFeatures);
break;

case 'JSONP':
if (!(source.url)) {
$log.error('[AngularJS - Openlayers] - You need an url properly configured to add a JSONP layer.');
Expand Down Expand Up @@ -601,10 +614,9 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
var extractStyles = source.extractStyles || false;
oSource = new ol.source.Vector({
url: source.url,
format: new ol.format.KML({
extractStyles: extractStyles
}),
radius: source.radius
format: new ol.format.KML(),
radius: source.radius,
extractStyles: extractStyles
});
break;
case 'Stamen':
Expand Down