├── .gitignore ├── css ├── bootstrap-combined.min.css ├── img │ └── search-icon.png └── main.css ├── index.html ├── js ├── bootstrap.js ├── controllers │ └── AppController.js ├── helpers │ └── symbolhelper.js ├── main.js ├── vendor │ └── angular-ui │ │ ├── assets │ │ ├── app.js │ │ ├── bootstrap-responsive.css │ │ ├── bootstrap.css │ │ ├── demo.css │ │ ├── github-16px.png │ │ ├── plunker.js │ │ ├── rainbow-generic.js │ │ ├── rainbow-html.js │ │ ├── rainbow-javascript.js │ │ ├── rainbow.css │ │ ├── rainbow.js │ │ ├── select2.css │ │ ├── select2.js │ │ ├── select2.png │ │ └── ui-select2.js │ │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ │ ├── ui-bootstrap-0.2.0.min.js │ │ └── ui-bootstrap-tpls-0.2.0.min.js └── widgets │ └── search │ ├── Search.js │ ├── SearchBootstrap.js │ ├── SearchController.js │ ├── SearchDirective.js │ └── template │ └── search.tpl.html └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | output/* 3 | *~ 4 | *.swp 5 | .cache/* 6 | .grunt/* 7 | .idea/* 8 | build/* 9 | *.lnk 10 | *ugly.js -------------------------------------------------------------------------------- /css/img/search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/odoe/angular-esri/1e567ff3487d8c68043e99a891c9dc6ff3274ba4/css/img/search-icon.png -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | #map { 2 | position: absolute; 3 | padding: 0; 4 | top: 0; 5 | left: 0; 6 | right: 0; 7 | bottom: 0; 8 | } 9 | 10 | div.search-container { 11 | position: absolute; 12 | display: block; 13 | z-index: 2; 14 | right: 5px; 15 | width: 350px; 16 | top: 7px !important; 17 | } 18 | 19 | input.search-input { 20 | position: relative; 21 | z-index: 3; 22 | width: 350px; 23 | font-size: 1.2em; 24 | border: 2px solid #34495e; 25 | float: right; 26 | line-height: 25px; 27 | padding-left: 30px; 28 | color: gray; 29 | background-image: url("img/search-icon.png"); 30 | background-repeat: no-repeat; 31 | background-position-x: 0.5em; 32 | background-position-y: 50%; 33 | } 34 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | angular-esri 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /js/bootstrap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author rrubalcava@odoe.net (Rene Rubalcava) 3 | */ 4 | /*global define:true */ 5 | 6 | (function() { 7 | "use strict"; 8 | 9 | define([ 10 | 'angular', 11 | 'controllers/AppController', 12 | 'widgets/search/SearchBootstrap' 13 | ], function(angular, AppController, SearchBootstrap) { 14 | 15 | function init() { 16 | var App = angular.module('app', ['ui.bootstrap']); 17 | AppController.start(App); 18 | SearchBootstrap.start(App); 19 | // need to bootstrap angular since we wait for dojo/DOM to load 20 | angular.bootstrap(document.body, ['app']); 21 | return App; 22 | } 23 | 24 | return { start: init }; 25 | 26 | }); 27 | 28 | }).call(this); -------------------------------------------------------------------------------- /js/controllers/AppController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author rrubalcava@odoe.net (Rene Rubalcava) 3 | */ 4 | /*global define:true*/ 5 | 6 | (function() { 7 | "use strict"; 8 | 9 | define([ 10 | 'angular', 11 | 'esri/map' 12 | ], function(angular, Map) { 13 | 14 | function mapConfigs() { 15 | return { 16 | basemap: 'streets', 17 | center: [-118.1704035141802,34.03597014510993], 18 | zoom: 15 19 | }; 20 | } 21 | 22 | function mapGen(elem) { 23 | return new Map(elem, mapConfigs()); 24 | } 25 | 26 | function AppController($scope) { 27 | $scope.map = mapGen('map'); 28 | } 29 | 30 | function init(App) { 31 | App.controller('AppCtrl', ['$scope', AppController]); 32 | return AppController; 33 | } 34 | 35 | return { start: init }; 36 | 37 | }); 38 | 39 | }).call(this); -------------------------------------------------------------------------------- /js/helpers/symbolhelper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author rrubalcava@odoe.net (Rene Rubalcava) 3 | */ 4 | /*global define:true*/ 5 | (function () { 6 | 'use strict'; 7 | 8 | define([ 9 | 'dojo/_base/Color', 10 | 'esri/symbol' 11 | ], function (Color, Symbol) { 12 | return { 13 | 14 | simpleMarker: function () { 15 | return new Symbol.SimpleMarkerSymbol(Symbol.SimpleMarkerSymbol.STYLE_SQUARE, 12, new Symbol.SimpleLineSymbol(Symbol.SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 1), new Color([0, 255, 0, 1])); 16 | }, 17 | 18 | lineSymbol: function () { 19 | return new Symbol.SimpleLineSymbol(Symbol.SimpleLineSymbol.STYLE_SOLID, new Color([124, 252, 0]), 3); 20 | }, 21 | 22 | polygonSymbol: function () { 23 | return new Symbol.SimpleFillSymbol(Symbol.SimpleFillSymbol.STYLE_SOLID, new Symbol.SimpleLineSymbol(Symbol.SimpleLineSymbol.STYLE_SOLID, new Color([153, 50, 204]), 2), new Color([255, 255, 0, 0.25])); 24 | }, 25 | 26 | selectedPolygonSymbol: function () { 27 | return new Symbol.SimpleFillSymbol(Symbol.SimpleFillSymbol.STYLE_SOLID, new Symbol.SimpleLineSymbol(Symbol.SimpleLineSymbol.STYLE_SOLID, new Color([255, 255, 0]), 1), new Color([0, 191, 255, 0.25])); 28 | }, 29 | 30 | selectedLineSymbol: function () { 31 | return new Symbol.SimpleLineSymbol(Symbol.SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 3); 32 | } 33 | }; 34 | }); 35 | 36 | }).call(this); 37 | -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author rrubalcava@odoe.net (Rene Rubalcava) 3 | */ 4 | /*global define:true, require:true, angular: true, console:true */ 5 | (function() { 6 | 'use strict'; 7 | 8 | var pathRX = new RegExp(/\/[^\/]+$/), locationPath = location.pathname.replace(pathRX, ''); 9 | 10 | define('angular', function() { 11 | if (angular) { return angular; } 12 | return {}; 13 | }); 14 | 15 | require({ 16 | async: true, 17 | aliases: [['text', 'dojo/text']], 18 | packages: [{ 19 | name: 'controllers', 20 | location: locationPath + 'js/controllers' 21 | }, { 22 | name: 'helpers', 23 | location: locationPath + 'js/helpers' 24 | }, { 25 | name: 'widgets', 26 | location: locationPath + 'js/widgets' 27 | }, { 28 | name: 'js', 29 | location: locationPath + 'js' 30 | } 31 | ] 32 | }); 33 | 34 | require([ 35 | 'dojo/ready', 36 | 'js/bootstrap' 37 | ], function(ready, bootstrap) { 38 | ready(function () { 39 | console.info('start the bootstrapper'); 40 | bootstrap.start(); 41 | }); 42 | }); 43 | 44 | }).call(this); -------------------------------------------------------------------------------- /js/vendor/angular-ui/assets/app.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('bootstrapDemoApp', ['ui.directives', 'ui.bootstrap', 'plunker']); 3 | 4 | function MainCtrl($scope, $http, orderByFilter) { 5 | var url = "http://50.116.42.77:3001"; 6 | $scope.selectedModules = []; 7 | //iFrame for downloading 8 | var $iframe = $("