Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-esri-map

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-esri-map - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

13

CHANGELOG.md

@@ -8,2 +8,12 @@ # Change Log

## [v1.1.4]
### Maintenance
Unminified dist files adhere to strict dependecy injection (DI). Note that minified dist files already had strict DI. [#269](https://github.com/Esri/angular-esri-map/issues/269)
### Documentation
Added documentation info for map directive "webmap-id" parameter.
Added readme links to recent presentation slides.
## [v1.1.3]

@@ -245,3 +255,4 @@

[unreleased]: https://github.com/Esri/angular-esri-map/compare/v1.1.3...v1.x
[unreleased]: https://github.com/Esri/angular-esri-map/compare/v1.1.4...v1.x
[v1.1.4]: https://github.com/Esri/angular-esri-map/compare/v1.1.3...v1.1.4
[v1.1.3]: https://github.com/Esri/angular-esri-map/compare/v1.1.2...v1.1.3

@@ -248,0 +259,0 @@ [v1.1.2]: https://github.com/Esri/angular-esri-map/compare/v1.1.1...v1.1.2

16

dist/angular-esri-core.js

@@ -21,3 +21,3 @@ (function(angular) {

*/
angular.module('esri.core').factory('esriLoader', function ($q) {
angular.module('esri.core').factory('esriLoader', ['$q', function ($q) {

@@ -135,3 +135,3 @@ /**

};
});
}]);

@@ -153,3 +153,3 @@ })(angular);

*/
angular.module('esri.core').service('esriRegistry', function($q) {
angular.module('esri.core').service('esriRegistry', ['$q', function($q) {
var registry = {};

@@ -217,3 +217,3 @@

};
});
}]);

@@ -234,3 +234,3 @@ })(angular);

*/
angular.module('esri.core').factory('esriMapUtils', function($q, esriLoader) {
angular.module('esri.core').factory('esriMapUtils', ['$q', 'esriLoader', function($q, esriLoader) {

@@ -356,3 +356,3 @@ // check if a variable is an array

return service;
});
}]);

@@ -373,3 +373,3 @@ })(angular);

*/
angular.module('esri.core').factory('esriLayerUtils', function(esriLoader) {
angular.module('esri.core').factory('esriLayerUtils', ['esriLoader', function(esriLoader) {

@@ -534,4 +534,4 @@ // parse array of visible layer ids from a string

return service;
});
}]);
})(angular);

@@ -1,1 +0,1 @@

!function(e){"use strict";e.module("esri.core",[])}(angular),function(e){"use strict";e.module("esri.core").factory("esriLoader",["$q",function(e){function r(r){var n=e.defer(),i=r||{};if(t())return n.reject("ESRI API is already loaded."),n.promise;var a=document.createElement("script");return a.type="text/javascript",a.src=i.url||window.location.protocol+"//js.arcgis.com/3.16compact",a.onload=function(){n.resolve(window.require)},document.body.appendChild(a),n.promise}function t(){return"undefined"!=typeof window.require}function n(r,n){var i=e.defer();return t()?"string"==typeof r?(require([r],function(e){i.resolve(e)}),i.promise.then(function(e){return n&&"function"==typeof n&&n(e),e})):r instanceof Array?(require(r,function(){var e=Array.prototype.slice.call(arguments);i.resolve(e)}),i.promise.then(function(e){return n&&"function"==typeof n&&n.apply(this,e),e})):(i.reject("An Array<String> or String is required to load modules."),i.promise):(i.reject("Trying to call esriLoader.require(), but Esri ArcGIS API has not been loaded yet. Run esriLoader.bootstrap() if you are lazy loading Esri ArcGIS API."),i.promise)}return{bootstrap:r,isLoaded:t,require:n}}])}(angular),function(e){"use strict";e.module("esri.core").service("esriRegistry",["$q",function(e){var r={};return{_register:function(t,n){r[t]||(r[t]=e.defer());var i=r[t];return n.then(function(e){return i.resolve(e),e},function(e){return i.reject(e),e}),function(){delete r[t]}},get:function(t){if(r[t])return r[t].promise;var n=e.defer();return r[t]=n,n.promise}}}])}(angular),function(e){"use strict";e.module("esri.core").factory("esriMapUtils",["$q","esriLoader",function(e,r){function t(e){return e instanceof Array}function n(e,r){return"esri.geometry.Extent"===e.declaredClass?e:new r(e)}var i={};return i.addCustomBasemap=function(e,n){return r.require("esri/basemaps").then(function(r){var i=n.baseMapLayers;return!t(i)&&t(n.urls)&&(i=n.urls.map(function(e){return{url:e}})),t(i)&&(r[e]={baseMapLayers:i,thumbnailUrl:n.thumbnailUrl,title:n.title}),r})},i.createMap=function(e,t){return r.require(["esri/map","esri/geometry/Extent"]).then(function(r){var i=r[0],a=r[1];return t&&t.hasOwnProperty("extent")&&(t.extent=n(t.extent,a)),new i(e,t)})},i.createWebMap=function(t,i,a,o){var s=e.defer();return r.require(["esri/arcgis/utils","esri/geometry/Extent"],function(e,r){a.hasOwnProperty("extent")&&(a.extent=n(a.extent,r)),e.createMap(t,i,{mapOptions:a}).then(function(r){o.layerInfos=e.getLegendLayers(r),o.itemInfo=r.itemInfo,s.resolve(r.map)})}),s.promise},i}])}(angular),function(e){"use strict";e.module("esri.core").factory("esriLayerUtils",["esriLoader",function(e){function r(e){var r;return"string"==typeof e&&(r=[],e.split(",").forEach(function(e){var t=parseInt(e);isNaN(t)||r.push(t)})),r}function t(e,r){return"esri.InfoTemplate"===e.declaredClass?e:e instanceof Array&&2===e.length?new r(e[0],e[1]):new r(e.title,e.content)}var n={};return n.createFeatureLayer=function(r,n){return e.require(["esri/layers/FeatureLayer","esri/InfoTemplate"]).then(function(e){var i=e[0],a=e[1];return n&&(n.infoTemplate&&(n.infoTemplate=t(n.infoTemplate,a)),n.hasOwnProperty("mode")&&(n.mode=i[n.mode])),new i(r,n)})},n.createVectorTileLayer=function(r,t){return e.require(["esri/layers/VectorTileLayer"]).then(function(e){var n=e[0];return new n(r,t)})},n.createDynamicMapServiceLayer=function(n,i,a){return e.require(["esri/layers/ArcGISDynamicMapServiceLayer","esri/InfoTemplate","esri/layers/ImageParameters"]).then(function(e){var o,s=e[0],u=e[1],l=e[2];if(i){if(i.infoTemplates)for(var c in i.infoTemplates)i.infoTemplates.hasOwnProperty(c)&&(i.infoTemplates[c].infoTemplate=t(i.infoTemplates[c].infoTemplate,u));if("object"==typeof i.imageParameters&&"esri.layers.ImageParameters"!==i.imageParameters.declaredClass){var f=new l;for(var p in i.imageParameters)i.imageParameters.hasOwnProperty(p)&&(f[p]=i.imageParameters[p]);i.imageParameters=f}}return o=new s(n,i),a&&o.setVisibleLayers(r(a)),o})},n.createInfoTemplate=function(r){return e.require("esri/InfoTemplate").then(function(e){return t(r,e)})},n}])}(angular),function(e){"use strict";e.module("esri.map",["esri.core"])}(angular),function(e){"use strict";e.module("esri.map").controller("EsriMapController",["$attrs","$timeout","esriMapUtils","esriRegistry",function(e,r,t,n){function i(e){return"undefined"==typeof e}function a(e,r){var t=r.geographicExtent&&r.geographicExtent.getCenter();t&&(t=t.normalize(),e.center={lat:t.y,lng:t.x}),e.zoom=r.getZoom()}var o,s=e;this.getMapOptions=function(){var e=this.mapOptions()||{};return this.basemap&&(e.basemap=this.basemap),this.center&&(e.center=this.center.lng&&this.center.lat?[this.center.lng,this.center.lat]:this.center),this.zoom&&(e.zoom=this.zoom),e},this.getMap=function(){return o},this.addLayer=function(e,r){return this.getMap().then(function(t){return t.addLayer(e,r)})},this.removeLayer=function(e){return this.getMap().then(function(r){return r.removeLayer(e)})},this.addLayerInfo=function(e){this.layerInfos?this.layerInfos.unshift(e):this.layerInfos=[e]},this.getLayerInfos=function(){return this.layerInfos},this.bindMapEvents=function(e,t){var n=this;this.getMap().then(function(o){o.loaded?(a(n,o),t.load&&n.load()(o)):t.load&&o.on("load",function(){e.$apply(function(){n.load()(o)})}),o.on("extent-change",function(i){t.extentChange&&n.extentChange()(i),n.inUpdateCycle||(n.inUpdateCycle=!0,e.$apply(function(){a(n,o),r(function(){n.inUpdateCycle=!1},0)}))}),e.$watch("mapCtrl.basemap",function(e,r){o.loaded&&e!==r&&o.setBasemap(e)}),n.inUpdateCycle=!1,i(t.center)&&i(t.zoom)||e.$watchGroup(["mapCtrl.center.lng","mapCtrl.center.lat","mapCtrl.zoom"],function(e){n.inUpdateCycle||""!==e[0]&&""!==e[1]&&""!==e[2]&&(n.inUpdateCycle=!0,o.centerAndZoom([e[0],e[1]],e[2]).then(function(){n.inUpdateCycle=!1}))}),e.$on("$destroy",function(){n.deregister&&n.deregister(),o.destroy()})})},o=s.webmapId?t.createWebMap(s.webmapId,s.id,this.getMapOptions(),this):t.createMap(s.id,this.getMapOptions()),s.registerAs&&(this.deregister=n._register(s.registerAs,o))}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriMap",function(){return{restrict:"E",scope:{center:"=?",zoom:"=?",itemInfo:"=?",basemap:"@",load:"&",extentChange:"&",mapOptions:"&"},controllerAs:"mapCtrl",bindToController:!0,controller:"EsriMapController",compile:function(e,r){return e.removeAttr("id"),e.append("<div id="+r.id+"></div>"),function(e,r,t,n){n.bindMapEvents(e,t)}}}})}(angular),function(e){"use strict";e.module("esri.map").directive("esriLegend",["$q","esriLoader",function(e,r){return{priority:-10,restrict:"EA",require:["?esriLegend","^esriMap"],replace:!0,scope:{},controllerAs:"legendCtrl",bindToController:!0,controller:function(){},link:function(t,n,i,a){var o=a[1],s=i.targetId||i.id,u=e.defer();r.require(["esri/dijit/Legend"],function(e){o.getMap().then(function(r){var n=function(r){var n,i={map:r},a=o.getLayerInfos();a&&(i.layerInfos=a),n=new e(i,s),n.startup(),t.$watchCollection(function(){return o.getLayerInfos()},function(e){n.refresh(e)}),u.resolve(n),t.$on("$destroy",function(){n.destroy()})};r.loaded?n(r):r.on("load",function(){n(r)})})})}}}])}(angular),function(e){"use strict";e.module("esri.map").controller("EsriLayerControllerBase",function(){function e(e){return e===!0||"true"===e}this.getLayerOptions=function(){var r=this.layerOptions()||{};return"undefined"!=typeof this.visible&&(r.visible=e(this.visible)),this.opacity&&(r.opacity=Number(this.opacity)),r},this.getLayerInfo=function(e,r){return{title:r.title||e.name,layer:e,hideLayers:r.hideLayers?r.hideLayers.split(",").map(Number):void 0,defaultSymbol:r.defaultSymbol?JSON.parse(r.defaultSymbol):!0}},this._bindLayerEvents=function(r,t,n,i){t.load&&(n.loaded?r.layerCtrl.load()(n):n.on("load",function(){r.$apply(function(){r.layerCtrl.load()(n)})})),t.updateEnd&&n.on("update-end",function(e){r.$apply(function(){r.layerCtrl.updateEnd()(e)})}),r.$watch("layerCtrl.visible",function(r,t){r!==t&&n.setVisibility(e(r))}),r.$watch("layerCtrl.opacity",function(e,r){e!==r&&n.setOpacity(Number(e))}),r.$on("$destroy",function(){i.removeLayer(n)})}})}(angular),function(e){"use strict";e.module("esri.map").controller("EsriFeatureLayerController",["$controller","esriLayerUtils",function(r,t){var n;e.extend(this,r("EsriLayerControllerBase")),this.getFeatureLayerOptions=function(){var e=this.getLayerOptions();return this.definitionExpression&&(e.definitionExpression=this.definitionExpression),e},this.getLayer=function(){return n},this.setInfoTemplate=function(e){return this.getLayer().then(function(r){return t.createInfoTemplate(e).then(function(e){return r.setInfoTemplate(e),e})})},this.bindLayerEvents=function(e,r,t,n){this._bindLayerEvents(e,r,t,n),e.$watch("layerCtrl.definitionExpression",function(e,r){e!==r&&t.setDefinitionExpression(e)})},n=t.createFeatureLayer(this.url,this.getFeatureLayerOptions())}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriFeatureLayer",function(){return{restrict:"E",require:["esriFeatureLayer","^esriMap"],replace:!0,scope:{url:"@",visible:"@?",opacity:"@?",definitionExpression:"@?",load:"&",updateEnd:"&",layerOptions:"&"},controllerAs:"layerCtrl",bindToController:!0,controller:"EsriFeatureLayerController",link:function(e,r,t,n){var i=n[0],a=n[1];i.getLayer().then(function(r){var n=i.getLayerInfo(r,t);a.addLayer(r,0),a.addLayerInfo(n),i.bindLayerEvents(e,t,r,a)})}}})}(angular),function(e){"use strict";e.module("esri.map").controller("EsriDynamicMapServiceLayerController",["$controller","esriLayerUtils",function(r,t){var n;e.extend(this,r("EsriLayerControllerBase")),this.getLayer=function(){return n},this.setInfoTemplate=function(e,r){return this.getLayer().then(function(n){return t.createInfoTemplate(r).then(function(r){var t=n.infoTemplates;return t||(t={}),t[e]={infoTemplate:r},n.setInfoTemplates(t),t})})},this.bindLayerEvents=function(e,r,t,n){this._bindLayerEvents(e,r,t,n)},n=t.createDynamicMapServiceLayer(this.url,this.getLayerOptions(),this.visibleLayers)}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriDynamicMapServiceLayer",function(){return{restrict:"E",require:["esriDynamicMapServiceLayer","^esriMap"],replace:!0,scope:{url:"@",visible:"@?",opacity:"@?",visibleLayers:"@?",load:"&",updateEnd:"&",layerOptions:"&"},controllerAs:"layerCtrl",bindToController:!0,controller:"EsriDynamicMapServiceLayerController",link:function(e,r,t,n){var i=n[0],a=n[1];i.getLayer().then(function(r){var n=i.getLayerInfo(r,t);a.addLayer(r),a.addLayerInfo(n),i.bindLayerEvents(e,t,r,a)})}}})}(angular),function(e){"use strict";e.module("esri.map").controller("EsriVectorTileLayerController",["$controller","esriLayerUtils",function(r,t){var n;e.extend(this,r("EsriLayerControllerBase")),this.getLayer=function(){return n},this.bindLayerEvents=function(e,r,t,n){this._bindLayerEvents(e,r,t,n)},n=t.createVectorTileLayer(this.url,this.getLayerOptions())}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriVectorTileLayer",function(){return{restrict:"E",require:["esriVectorTileLayer","^esriMap"],replace:!0,scope:{url:"@",visible:"@?",opacity:"@?",load:"&",layerOptions:"&"},controllerAs:"layerCtrl",bindToController:!0,controller:"EsriVectorTileLayerController",link:function(e,r,t,n){var i=n[0],a=n[1];i.getLayer().then(function(r){var n=i.getLayerInfo(r,t);a.addLayer(r),a.addLayerInfo(n),i.bindLayerEvents(e,t,r,a)})}}})}(angular),function(e){"use strict";e.module("esri.map").directive("esriInfoTemplate",function(){return{restrict:"E",require:["?esriInfoTemplate","?^esriDynamicMapServiceLayer","?^esriFeatureLayer"],replace:!0,compile:function(e){var r=e.html();return e.html(""),function(e,t,n,i){var a=i[1],o=i[2];a&&a.setInfoTemplate(n.layerId,{title:n.title,content:r}),o&&o.setInfoTemplate({title:n.title,content:r})}}}})}(angular);
!function(e){"use strict";e.module("esri.core",[])}(angular),function(e){"use strict";e.module("esri.core").factory("esriLoader",["$q",function(e){function r(r){var n=e.defer(),i=r||{};if(t())return n.reject("ESRI API is already loaded."),n.promise;var a=document.createElement("script");return a.type="text/javascript",a.src=i.url||window.location.protocol+"//js.arcgis.com/3.16compact",a.onload=function(){n.resolve(window.require)},document.body.appendChild(a),n.promise}function t(){return"undefined"!=typeof window.require}function n(r,n){var i=e.defer();return t()?"string"==typeof r?(require([r],function(e){i.resolve(e)}),i.promise.then(function(e){return n&&"function"==typeof n&&n(e),e})):r instanceof Array?(require(r,function(){var e=Array.prototype.slice.call(arguments);i.resolve(e)}),i.promise.then(function(e){return n&&"function"==typeof n&&n.apply(this,e),e})):(i.reject("An Array<String> or String is required to load modules."),i.promise):(i.reject("Trying to call esriLoader.require(), but Esri ArcGIS API has not been loaded yet. Run esriLoader.bootstrap() if you are lazy loading Esri ArcGIS API."),i.promise)}return{bootstrap:r,isLoaded:t,require:n}}])}(angular),function(e){"use strict";e.module("esri.core").service("esriRegistry",["$q",function(e){var r={};return{_register:function(t,n){r[t]||(r[t]=e.defer());var i=r[t];return n.then(function(e){return i.resolve(e),e},function(e){return i.reject(e),e}),function(){delete r[t]}},get:function(t){if(r[t])return r[t].promise;var n=e.defer();return r[t]=n,n.promise}}}])}(angular),function(e){"use strict";e.module("esri.core").factory("esriMapUtils",["$q","esriLoader",function(e,r){function t(e){return e instanceof Array}function n(e,r){return"esri.geometry.Extent"===e.declaredClass?e:new r(e)}var i={};return i.addCustomBasemap=function(e,n){return r.require("esri/basemaps").then(function(r){var i=n.baseMapLayers;return!t(i)&&t(n.urls)&&(i=n.urls.map(function(e){return{url:e}})),t(i)&&(r[e]={baseMapLayers:i,thumbnailUrl:n.thumbnailUrl,title:n.title}),r})},i.createMap=function(e,t){return r.require(["esri/map","esri/geometry/Extent"]).then(function(r){var i=r[0],a=r[1];return t&&t.hasOwnProperty("extent")&&(t.extent=n(t.extent,a)),new i(e,t)})},i.createWebMap=function(t,i,a,o){var s=e.defer();return r.require(["esri/arcgis/utils","esri/geometry/Extent"],function(e,r){a.hasOwnProperty("extent")&&(a.extent=n(a.extent,r)),e.createMap(t,i,{mapOptions:a}).then(function(r){o.layerInfos=e.getLegendLayers(r),o.itemInfo=r.itemInfo,s.resolve(r.map)})}),s.promise},i}])}(angular),function(e){"use strict";e.module("esri.core").factory("esriLayerUtils",["esriLoader",function(e){function r(e){var r;return"string"==typeof e&&(r=[],e.split(",").forEach(function(e){var t=parseInt(e);isNaN(t)||r.push(t)})),r}function t(e,r){return"esri.InfoTemplate"===e.declaredClass?e:e instanceof Array&&2===e.length?new r(e[0],e[1]):new r(e.title,e.content)}var n={};return n.createFeatureLayer=function(r,n){return e.require(["esri/layers/FeatureLayer","esri/InfoTemplate"]).then(function(e){var i=e[0],a=e[1];return n&&(n.infoTemplate&&(n.infoTemplate=t(n.infoTemplate,a)),n.hasOwnProperty("mode")&&(n.mode=i[n.mode])),new i(r,n)})},n.createVectorTileLayer=function(r,t){return e.require(["esri/layers/VectorTileLayer"]).then(function(e){var n=e[0];return new n(r,t)})},n.createDynamicMapServiceLayer=function(n,i,a){return e.require(["esri/layers/ArcGISDynamicMapServiceLayer","esri/InfoTemplate","esri/layers/ImageParameters"]).then(function(e){var o,s=e[0],u=e[1],l=e[2];if(i){if(i.infoTemplates)for(var c in i.infoTemplates)i.infoTemplates.hasOwnProperty(c)&&(i.infoTemplates[c].infoTemplate=t(i.infoTemplates[c].infoTemplate,u));if("object"==typeof i.imageParameters&&"esri.layers.ImageParameters"!==i.imageParameters.declaredClass){var f=new l;for(var p in i.imageParameters)i.imageParameters.hasOwnProperty(p)&&(f[p]=i.imageParameters[p]);i.imageParameters=f}}return o=new s(n,i),a&&o.setVisibleLayers(r(a)),o})},n.createInfoTemplate=function(r){return e.require("esri/InfoTemplate").then(function(e){return t(r,e)})},n}])}(angular),function(e){"use strict";e.module("esri.map",["esri.core"])}(angular),function(e){"use strict";e.module("esri.map").controller("EsriMapController",["$attrs","$timeout","esriMapUtils","esriRegistry",function(e,r,t,n){function i(e){return"undefined"==typeof e}function a(e,r){var t=r.geographicExtent&&r.geographicExtent.getCenter();t&&(t=t.normalize(),e.center={lat:t.y,lng:t.x}),e.zoom=r.getZoom()}var o,s=e;this.getMapOptions=function(){var e=this.mapOptions()||{};return this.basemap&&(e.basemap=this.basemap),this.center&&(this.center.lng&&this.center.lat?e.center=[this.center.lng,this.center.lat]:e.center=this.center),this.zoom&&(e.zoom=this.zoom),e},this.getMap=function(){return o},this.addLayer=function(e,r){return this.getMap().then(function(t){return t.addLayer(e,r)})},this.removeLayer=function(e){return this.getMap().then(function(r){return r.removeLayer(e)})},this.addLayerInfo=function(e){this.layerInfos?this.layerInfos.unshift(e):this.layerInfos=[e]},this.getLayerInfos=function(){return this.layerInfos},this.bindMapEvents=function(e,t){var n=this;this.getMap().then(function(o){o.loaded?(a(n,o),t.load&&n.load()(o)):t.load&&o.on("load",function(){e.$apply(function(){n.load()(o)})}),o.on("extent-change",function(i){t.extentChange&&n.extentChange()(i),n.inUpdateCycle||(n.inUpdateCycle=!0,e.$apply(function(){a(n,o),r(function(){n.inUpdateCycle=!1},0)}))}),e.$watch("mapCtrl.basemap",function(e,r){o.loaded&&e!==r&&o.setBasemap(e)}),n.inUpdateCycle=!1,i(t.center)&&i(t.zoom)||e.$watchGroup(["mapCtrl.center.lng","mapCtrl.center.lat","mapCtrl.zoom"],function(e){n.inUpdateCycle||""!==e[0]&&""!==e[1]&&""!==e[2]&&(n.inUpdateCycle=!0,o.centerAndZoom([e[0],e[1]],e[2]).then(function(){n.inUpdateCycle=!1}))}),e.$on("$destroy",function(){n.deregister&&n.deregister(),o.destroy()})})},o=s.webmapId?t.createWebMap(s.webmapId,s.id,this.getMapOptions(),this):t.createMap(s.id,this.getMapOptions()),s.registerAs&&(this.deregister=n._register(s.registerAs,o))}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriMap",function(){return{restrict:"E",scope:{center:"=?",zoom:"=?",itemInfo:"=?",basemap:"@",load:"&",extentChange:"&",mapOptions:"&"},controllerAs:"mapCtrl",bindToController:!0,controller:"EsriMapController",compile:function(e,r){return e.removeAttr("id"),e.append("<div id="+r.id+"></div>"),function(e,r,t,n){n.bindMapEvents(e,t)}}}})}(angular),function(e){"use strict";e.module("esri.map").directive("esriLegend",["$q","esriLoader",function(e,r){return{priority:-10,restrict:"EA",require:["?esriLegend","^esriMap"],replace:!0,scope:{},controllerAs:"legendCtrl",bindToController:!0,controller:function(){},link:function(t,n,i,a){var o=a[1],s=i.targetId||i.id,u=e.defer();r.require(["esri/dijit/Legend"],function(e){o.getMap().then(function(r){var n=function(r){var n,i={map:r},a=o.getLayerInfos();a&&(i.layerInfos=a),n=new e(i,s),n.startup(),t.$watchCollection(function(){return o.getLayerInfos()},function(e){n.refresh(e)}),u.resolve(n),t.$on("$destroy",function(){n.destroy()})};r.loaded?n(r):r.on("load",function(){n(r)})})})}}}])}(angular),function(e){"use strict";e.module("esri.map").controller("EsriLayerControllerBase",function(){function e(e){return e===!0||"true"===e}this.getLayerOptions=function(){var r=this.layerOptions()||{};return"undefined"!=typeof this.visible&&(r.visible=e(this.visible)),this.opacity&&(r.opacity=Number(this.opacity)),r},this.getLayerInfo=function(e,r){return{title:r.title||e.name,layer:e,hideLayers:r.hideLayers?r.hideLayers.split(",").map(Number):void 0,defaultSymbol:r.defaultSymbol?JSON.parse(r.defaultSymbol):!0}},this._bindLayerEvents=function(r,t,n,i){t.load&&(n.loaded?r.layerCtrl.load()(n):n.on("load",function(){r.$apply(function(){r.layerCtrl.load()(n)})})),t.updateEnd&&n.on("update-end",function(e){r.$apply(function(){r.layerCtrl.updateEnd()(e)})}),r.$watch("layerCtrl.visible",function(r,t){r!==t&&n.setVisibility(e(r))}),r.$watch("layerCtrl.opacity",function(e,r){e!==r&&n.setOpacity(Number(e))}),r.$on("$destroy",function(){i.removeLayer(n)})}})}(angular),function(e){"use strict";e.module("esri.map").controller("EsriFeatureLayerController",["$controller","esriLayerUtils",function(r,t){var n;e.extend(this,r("EsriLayerControllerBase")),this.getFeatureLayerOptions=function(){var e=this.getLayerOptions();return this.definitionExpression&&(e.definitionExpression=this.definitionExpression),e},this.getLayer=function(){return n},this.setInfoTemplate=function(e){return this.getLayer().then(function(r){return t.createInfoTemplate(e).then(function(e){return r.setInfoTemplate(e),e})})},this.bindLayerEvents=function(e,r,t,n){this._bindLayerEvents(e,r,t,n),e.$watch("layerCtrl.definitionExpression",function(e,r){e!==r&&t.setDefinitionExpression(e)})},n=t.createFeatureLayer(this.url,this.getFeatureLayerOptions())}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriFeatureLayer",function(){return{restrict:"E",require:["esriFeatureLayer","^esriMap"],replace:!0,scope:{url:"@",visible:"@?",opacity:"@?",definitionExpression:"@?",load:"&",updateEnd:"&",layerOptions:"&"},controllerAs:"layerCtrl",bindToController:!0,controller:"EsriFeatureLayerController",link:function(e,r,t,n){var i=n[0],a=n[1];i.getLayer().then(function(r){var n=i.getLayerInfo(r,t);a.addLayer(r,0),a.addLayerInfo(n),i.bindLayerEvents(e,t,r,a)})}}})}(angular),function(e){"use strict";e.module("esri.map").controller("EsriDynamicMapServiceLayerController",["$controller","esriLayerUtils",function(r,t){var n;e.extend(this,r("EsriLayerControllerBase")),this.getLayer=function(){return n},this.setInfoTemplate=function(e,r){return this.getLayer().then(function(n){return t.createInfoTemplate(r).then(function(r){var t=n.infoTemplates;return t||(t={}),t[e]={infoTemplate:r},n.setInfoTemplates(t),t})})},this.bindLayerEvents=function(e,r,t,n){this._bindLayerEvents(e,r,t,n)},n=t.createDynamicMapServiceLayer(this.url,this.getLayerOptions(),this.visibleLayers)}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriDynamicMapServiceLayer",function(){return{restrict:"E",require:["esriDynamicMapServiceLayer","^esriMap"],replace:!0,scope:{url:"@",visible:"@?",opacity:"@?",visibleLayers:"@?",load:"&",updateEnd:"&",layerOptions:"&"},controllerAs:"layerCtrl",bindToController:!0,controller:"EsriDynamicMapServiceLayerController",link:function(e,r,t,n){var i=n[0],a=n[1];i.getLayer().then(function(r){var n=i.getLayerInfo(r,t);a.addLayer(r),a.addLayerInfo(n),i.bindLayerEvents(e,t,r,a)})}}})}(angular),function(e){"use strict";e.module("esri.map").controller("EsriVectorTileLayerController",["$controller","esriLayerUtils",function(r,t){var n;e.extend(this,r("EsriLayerControllerBase")),this.getLayer=function(){return n},this.bindLayerEvents=function(e,r,t,n){this._bindLayerEvents(e,r,t,n)},n=t.createVectorTileLayer(this.url,this.getLayerOptions())}])}(angular),function(e){"use strict";e.module("esri.map").directive("esriVectorTileLayer",function(){return{restrict:"E",require:["esriVectorTileLayer","^esriMap"],replace:!0,scope:{url:"@",visible:"@?",opacity:"@?",load:"&",layerOptions:"&"},controllerAs:"layerCtrl",bindToController:!0,controller:"EsriVectorTileLayerController",link:function(e,r,t,n){var i=n[0],a=n[1];i.getLayer().then(function(r){var n=i.getLayerInfo(r,t);a.addLayer(r),a.addLayerInfo(n),i.bindLayerEvents(e,t,r,a)})}}})}(angular),function(e){"use strict";e.module("esri.map").directive("esriInfoTemplate",function(){return{restrict:"E",require:["?esriInfoTemplate","?^esriDynamicMapServiceLayer","?^esriFeatureLayer"],replace:!0,compile:function(e){var r=e.html();return e.html(""),function(e,t,n,i){var a=i[1],o=i[2];a&&a.setInfoTemplate(n.layerId,{title:n.title,content:r}),o&&o.setInfoTemplate({title:n.title,content:r})}}}})}(angular);

@@ -54,2 +54,3 @@ /*eslint-env node*/

'src/core/esriLayerUtils.js'])
.pipe(ngAnnotate({single_quotes: true}))
.pipe(concat('angular-esri-core.js'))

@@ -59,3 +60,2 @@ .pipe(gulp.dest('dist'))

.pipe(stripDebug())
.pipe(ngAnnotate())
.pipe(uglify())

@@ -88,2 +88,3 @@ .pipe(rename('angular-esri-core.min.js'))

'src/layers/esriInfoTemplate.js'])
.pipe(ngAnnotate({single_quotes: true}))
.pipe(concat('angular-esri-map.js'))

@@ -93,3 +94,2 @@ .pipe(gulp.dest('dist'))

.pipe(stripDebug())
.pipe(ngAnnotate())
.pipe(uglify())

@@ -96,0 +96,0 @@ .pipe(rename('angular-esri-map.min.js'))

{
"name": "angular-esri-map",
"version": "1.1.3",
"version": "1.1.4",
"description": "A collection of directives to help you use Esri maps and services in your Angular applications",

@@ -20,7 +20,7 @@ "main": "dist/angular-esri-map.js",

"gulp-gh-pages": "^0.4.0",
"gulp-ng-annotate": "^0.3.3",
"gulp-ng-annotate": "^2.0.0",
"gulp-ngdocs": "^0.2.13",
"gulp-rename": "~1.2.0",
"gulp-strip-debug": "~0.3.0",
"gulp-uglify": "~0.3.0",
"gulp-uglify": "^1.5.3",
"gulp-util": "~2.2.16",

@@ -33,3 +33,3 @@ "jasmine-core": "^2.3.4",

"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^0.2.1",
"karma-phantomjs-launcher": "^1.0.0",
"phantomjs": "^1.9.18",

@@ -36,0 +36,0 @@ "protractor": "~2.2.0",

@@ -18,3 +18,3 @@ angular-esri-map

<!-- load angular-esri-map from CDN -->
<script src="//npmcdn.com/angular-esri-map@1.1.2"></script>
<script src="//npmcdn.com/angular-esri-map@1"></script>
```

@@ -38,3 +38,3 @@ ```bash

<head>
<title>Angular Esri Quickstart</title>
<title>Angular Esri Quick Start</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">

@@ -56,3 +56,3 @@ <meta charset="utf-8">

<!-- load angular-esri-map -->
<script src="//npmcdn.com/angular-esri-map@1.1.2"></script>
<script src="//npmcdn.com/angular-esri-map@1"></script>

@@ -111,2 +111,6 @@ <script type="text/javascript">

**Presentations**
* [Declarative Mapping Applications with AngularJS and the ArcGIS API for JavaScript](http://proceedings.esri.com/library/userconf/devsummit16/papers/dev_int_193.pdf), Esri 2016 International Developer Summit
* [ArcGIS API for JavaScript and AngularJS: What's New, What's Next](http://jwasilgeo.github.io/esri-jsapi-and-angular-whats-next-dev-summit-2016), Esri 2016 International Developer Summit
## Issues

@@ -113,0 +117,0 @@

@@ -23,2 +23,3 @@ (function(angular) {

* @param {Number=} zoom The initial zoom level of the map.
* @param {String=} webmap-id A web map item id if loading from a saved web map. See also the `item-info` parameter.
* @param {Object=} item-info When loading a web map from an item id, this object will be populated with the item's info.

@@ -25,0 +26,0 @@ * @param {String=} basemap The basemap of the map, which can be a valid string from the ArcGIS API for JavaScript, or a custom basemap.

@@ -34,3 +34,3 @@ describe('esriRegistry', function() {

it('should get the registerd promise', function() {
it('should get the registered promise', function() {
esriRegistry.get('test').then(function(map) {

@@ -37,0 +37,0 @@ expect(map).toEqual(fakeMap);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc