├── .gitignore ├── .jshintrc ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | # Logs 3 | logs 4 | *.log 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # Compiled binary addons (http://nodejs.org/api/addons.html) 21 | build/Release 22 | 23 | # Dependency directory 24 | # Deployed apps should consider commenting this line out: 25 | # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git 26 | node_modules 27 | /nbproject/private/ -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | // JSHint Configuration, esri jsapi 3 | // Modified from [jshint web defaults][1]. 4 | // Differences between the default and our file are noted 5 | // Options that are commented out completely are uneccesary or problematic for our codebase 6 | // [1] : https://github.com/jshint/jshint/blob/2.x/examples/.jshintrc 7 | // See http://jshint.com/docs/ for more details 8 | 9 | "maxerr" : 5000, // {int} Maximum error before stopping ** Get ALL the errors ** 10 | 11 | // Enforcing - true = enforce this rule, false = don't enforce this rule 12 | "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) 13 | "camelcase" : false, // true: Identifiers must be in camelCase 14 | "curly" : true, // true: Require {} for every new block or scope 15 | "eqeqeq" : false, // true: Require triple equals (===) for comparison ** Just use triples with undefined, null, false, 0 and 1 ** 16 | "es3" : true, // true: Adhere to ECMAScript 3 specification ** Still needed until IE8 support is dropped ** 17 | "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() ** Still needed until IE8 support is dropped ** 18 | "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` ** Avoids confusion and minification errors ** 19 | "latedef" : false, // true: Require variables/functions to be defined before being used 20 | "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` ** Coding style enforcement ** 21 | "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` 22 | "noempty" : true, // true: Prohibit use of empty blocks 23 | "nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment) ** Coding style enforcement ** 24 | "plusplus" : false, // true: Prohibit use of `++` & `--` 25 | "quotmark" : "single", // Quotation mark consistency: ** Use the same style. Doubles should be used in most cases ** 26 | // false : do nothing (default) 27 | // true : ensure whatever is used is consistent 28 | // "single" : require single quotes 29 | // "double" : require double quotes 30 | "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) 31 | "unused" : "strict", // true: Require all defined variables be used 32 | "strict" : false, // true: Requires all functions run in ES5 Strict Mode ** Dojo style and existing codebase conflicts ** 33 | "trailing" : false, // true: Prohibit trailing whitespaces 34 | //"indent" : 4, // {int} Number of spaces to use for indentation 35 | //"maxparams" : false, // {int} Max number of formal params allowed per function 36 | //"maxdepth" : false, // {int} Max depth of nested blocks (within functions) 37 | //"maxstatements" : false, // {int} Max number statements per function 38 | //"maxcomplexity" : false, // {int} Max cyclomatic complexity per function 39 | //"maxlen" : false, // {int} Max number of characters per line 40 | 41 | // Relaxing - false = continue to enforce this rule, true = don't enforce this rule (relax it) 42 | "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) 43 | "boss" : false, // true: Tolerate assignments where comparisons would be expected 44 | "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. 45 | "eqnull" : true, // true: Tolerate use of `== null` 46 | "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) 47 | "esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`) 48 | "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) 49 | // (ex: `for each`, multiple try/catch, function expression…) 50 | "evil" : false, // true: Tolerate use of `eval` and `new Function()` 51 | "expr" : false, // true: Tolerate `ExpressionStatement` as Programs 52 | "funcscope" : true, // true: Tolerate defining variables inside control statements ** Other variable checks keep use from abusing this ** 53 | "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') 54 | "iterator" : false, // true: Tolerate using the `__iterator__` property 55 | "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block 56 | "laxbreak" : false, // true: Tolerate possibly unsafe line breakings 57 | "laxcomma" : false, // true: Tolerate comma-first style coding 58 | "loopfunc" : true, // true: Tolerate functions being defined in loops ** Almost required in some callback & promise style code ** 59 | "multistr" : false, // true: Tolerate multi-line strings 60 | "proto" : false, // true: Tolerate using the `__proto__` property 61 | "scripturl" : true, // true: Tolerate script-targeted URLs ** If this is being used, there is probably a good reason ** 62 | "smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment 63 | "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` 64 | "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation 65 | "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` 66 | "validthis" : true, // true: Tolerate using this in a non-constructor function ** We don't run in `strict mode` & coding style conflicts ** 67 | 68 | // Environments 69 | "browser" : true, // Web Browser (window, document, etc) 70 | "devel" : true, // Development/debugging (alert, confirm, etc) 71 | "couch" : false, // CouchDB 72 | "dojo" : false, // Dojo Toolkit ** Don't use global dojo objects. Use AMD style coding ** 73 | "jquery" : false, // jQuery 74 | "mootools" : false, // MooTools 75 | "node" : false, // Node.js 76 | "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) 77 | "prototypejs" : false, // Prototype and Scriptaculous 78 | "rhino" : false, // Rhino 79 | "worker" : false, // Web Workers ** Make a jshint comment when this is `true` ** 80 | "wsh" : false, // Windows Scripting Host 81 | "yui" : false, // Yahoo User Interface 82 | 83 | // Legacy ** According to jshint docs, these options are NOT to be used or relied on. Removing them. 84 | //"nomen" : false, // true: Prohibit dangling `_` in variables 85 | //"onevar" : false, // true: Allow only one `var` statement per function 86 | //"passfail" : false, // true: Stop on first error 87 | //"white" : false, // true: Check against strict whitespace and indentation rules 88 | 89 | // Custom Globals - additional predefined global variables 90 | // Using both `predef` and `globals` to support tools with older jshint parsers 91 | "predef" : [ 92 | "define", 93 | "require" 94 | ], 95 | "globals" : { // ** `false` = don't allow variable to be redefined locally 96 | "define": false, 97 | "require": false 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 David Spriggs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cmv-contrib-widgets 2 | 3 | User contributed widgets for the [Configurable Map Viewer (CMV)](https://github.com/cmv/cmv-app/) project. 4 | 5 | Have a widget to add? See [Contributing](https://github.com/cmv/cmv-contrib-widgets#contributing). 6 | 7 | ## Layer Widgets 8 | 9 | Widgets that add new types of layers and additional layer data to a map. 10 | 11 | | Widget | Description | 12 | | :----: | ----------- | 13 | | [Add WMS Layers dynamically ](https://github.com/vojvod/CMV_addWMSLayer_Widget) | A double widget for adding WMS Layers using a combobox or a textbox. | 14 | | [Advanced Draw](https://github.com/ishiland/cmv-widgets#advanceddraw) | Add text, redo/undo drawn features and additional styling options. | 15 | | [Drag and Drop](http://github.com/BrianBunker/cmv-widgets/tree/master/DnD) | Add data to the map viewer by dragging and dropping resources onto the map or widget. | 16 | | [Dynamic Feature Layer Renderer ](https://github.com/vojvod/CMV_Renderer_Widget) | It renders and adds a feature layer on the map dynamically. It can be used for map services hosted in ArcGIS for Server version 10.1 or above. | 17 | | [Heatmap](https://github.com/tmcgee/cmv-widgets#heatmap) | The Heatmap widget uses a HeatmapRenderer to render feature layer data into a raster visualization that emphasizes areas of higher density or weighted values. | 18 | | [Heatmap Toggle](https://github.com/roemhildtg/CMV_Widgets#heatmap) | Toggle a heat map on point layers using the dynamic sublayer menu. | 19 | | [Label Layers](https://github.com/roemhildtg/cmv-widgets/tree/master/widgets/LabelLayer) | A configureable label widget allowing users to create and customize labels on dynamic and feature layers 20 | | [Layer Labels](https://github.com/tmcgee/cmv-widgets#layer-labels) | A simple widget to add labels for one or more Feature Layers. | 21 | | [Layer Swapper](https://github.com/jebu75/cmv-layer-swapper) | Title pane widget to allow swapping in/out a configurable list of dynamic or tile layers. | 22 | | [Layer Toggle](https://github.com/tmcgee/cmv-widgets#layer-toggle) | A simple widget to toggle the visibility of a set of layers. Only a single layer in the set can be visible at any time. All others are turned off when the target layer's visibility is set. | 23 | | [NEXRAD](https://github.com/goriliukasbuxton/Nexrad) | NEXRAD weather radar widget. | 24 | | [PointClustering](https://github.com/ERS-Long/PointClustering) | PointClustering of point sublayer (CMV1.3.4) | 25 | | [Toggle StreetView Tiles](https://github.com/tmcgee/cmv-widgets#toggle-streetview-tiles) | Used in conjunction with the CMV StreetView widget or the [Open External Map](https://github.com/tmcgee/cmv-widgets#open-external-map) widget. Shows a StreetView tiles layer when waiting for a map click to get coordinates for the respective widgets. | 26 | | [WMS Basemaps](https://github.com/ishiland/cmv-widgets#wmsbasemaps) | Use WMS Layers as basemaps. Works in place of the core CMV Basemap widget. | 27 | 28 | ## Data, Search, And Query Widgets 29 | 30 | Widgets that extract and manipulate the display of data in the application. 31 | 32 | | Widget | Description | 33 | | :----: | ----------- | 34 | | [Advanced Search Widget ](https://github.com/vojvod/CMV_AdvancedSearch_Widget) | Used together with [Attributes Tables](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget to query feature layers. With this widget you can: 1.search by attributes 2. search by location 3. search by address 4. search by other selected features. | 35 | | [Attributes Tables](https://github.com/tmcgee/cmv-widgets#attributes-tables) | A highly configurable widget to display the results of one or more Query, Find or Geoprocessor Tasks. | 36 | | [Export](https://github.com/tmcgee/cmv-widgets#export) | Export features from the [Attributes Tables](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget or other widgets. Features can be exported in tabular formats such as Excel and CSV as well as spatial formats such as Esri shapefiles, KML and GeoJSON. 37 | | [Export Graphics](https://github.com/tmcgee/cmv-widgets#export-graphics) | Used with the [Export](https://github.com/tmcgee/cmv-widgets#export) widget to allow the user to export graphic features from one or more Graphic or Feature layers. 38 | | [Export to shapefile](https://github.com/aspetkov/cmv-widgets/tree/master/JS2Shapefile) | A javascript library for generating ESRI shapefiles in the client from Arcgis javascript map graphics with supporting a UTF-8 encoding. 39 | | [Extract](https://github.com/tr3vorm/cmv-extract-widget) | TitlePane widget to extract selected layer from current extents using geoprocessing tool (clip and ship). | 40 | | [Filter](https://github.com/roemhildtg/cmv-widgets/tree/master/widgets/Filter) | A simple widget allowing users to apply custom filters to a map layer or table 41 | | [Identify Panel](https://github.com/dougrchamberlain/IdentifyPanel) | TitlePane widget to allow identify results to be viewed on the side instead of in a popup/infowindow. | 42 | | [Nearby](http://github.com/BrianBunker/cmv-widgets/tree/master//Nearby) | Discover features within a radius or drivetime of a map click location. | 43 | | [Query Statistics](https://github.com/cwdotgis/cmv-widgets/tree/master/widgets) | Query summary statistics for a selected feature service's features in the current map view. | 44 | | [Related Records](https://github.com/roemhildtg/CMV_Widgets#relatedrecordstable) | Queries related records of feature layers and displays results in a tabbed dgrid tables. | 45 | | [Report](https://github.com/tmcgee/cmv-widgets#report) | Highly configurable widget used to create a mult-page PDF report from a single feature or multiple features. | 46 | | [Search](https://github.com/tmcgee/cmv-widgets#search) | Used in conjunction with the [Attributes Tables](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget to provide a user interface for querying feature layers, tables and related records. | 47 | 48 | 49 | ## Time Widgets 50 | 51 | Widgets that control and modify time (and potentially spacetime). 52 | 53 | | Widget | Description | 54 | | :----: | ----------- | 55 | | [Map Refresh Timer Widget](https://github.com/vojvod/CMV_MapRefreshTimer_Widget) | It refreshes the map layers periodically. You can set the preferred map layers and the refresh timer interval. | 56 | | [TimeSlider](https://github.com/roemhildtg/CMV_Widgets#timeslider) | Control the current display of all time enabled layers on the map using a simple Esri TimeSlider widget. | 57 | | [TimeSlider Advanced](https://github.com/vojvod/CMV_TimeSlider_Widget) | Control all time enabled layers on the map. It allows you to set the startTime and endTime dynamically. | 58 | 59 | ## Map Navigation and Control Widgets 60 | 61 | Widgets that display and modify various aspects of the map. 62 | 63 | | Widget | Description | 64 | | :----: | ----------- | 65 | | [FullScreen](https://github.com/tmcgee/cmv-widgets#fullscreen) | A simple widget containing a button to toggle the CMV map to a maximized full screen view and restore it to the original dimensions. | 66 | | [Google nearby](https://github.com/aspetkov/cmv-widgets/tree/master/GoogleNearby) | Discover objects within a radius of a map click location from Google database. Add export on the objects to shapefile. | 67 | | [Goto Coordinate](http://github.com/BrianBunker/cmv-widgets/tree/master//Goto) | Center the map at a specific location in geographic, UTM, or MGRS coordinates. | 68 | | [Locator Control Widget](https://github.com/tmcgee/cmv-widgets#locator-control) | A widget to allow the user to change the properties of the CMV Locate Button widget in real-time. | 69 | | [Map Extent Widget](https://github.com/ERS-Long/MapExtent) | CMV Widget to get map extent and zoom level. | 70 | | [Mapillary](https://github.com/tmcgee/cmv-widgets/tree/master#mapillary) | A replacement for the CMV Google StreetView widget that display street level imagery from [Mapillary](https://www.mapillary.com/) using [MapillaryJS](https://github.com/mapillary/mapillary-js). | 71 | | [Navigation Hash](http://github.com/BrianBunker/cmv-widgets/tree/master//MapNavigationHash) | Display the map center point in the url and use the browser back/forward buttons as previous/next extent buttons. | 72 | | [Navigation Toolbar](https://github.com/friendde/ArcGIS_JS_NavigationTools) | A toolbar for simple map navigation including previous and next extent tracker. | 73 | | [Open External Map](https://github.com/tmcgee/cmv-widgets/tree/master#open-external-map) | Open maps in an external window for Google Hybrid, Google StreetView, Bing Hybrid, Bing Bird's Eye, Bing Streetside, MapQuest and OpenStreetMap. The map is centered on the coordinates based on a map click or Latitude and Longitude values provided by the user. Can be combined with the [Toggle StreetView Tiles](https://github.com/tmcgee/cmv-widgets#toggle-streetview-tiles) widget to show the availability of Google StreetView while clicking on the map. | 74 | | [Projections](https://github.com/tr3vorm/cmv-projections-widget) | TitlePane widget for showing coordinates in selected projections, and for showing a specified location. | 75 | | [Waze](https://github.com/carrbrpoa/cmv-widget-waze.git) | CMV Widget to add embedded Waze (iFrame) to your CMV. | 76 | | [What3Words](https://github.com/tmcgee/cmv-widgets#what3words) | A simple widget to send a 3 word address or lat/lng to what3words and zoom the map to the resulting location. The lat/lng and 3 word address for the location are displayed from the search result. | 77 | | [Zoom To Extent](https://github.com/evermanwa/Zoom-To-Extent) | Zoom to a specific area on the map based off of a drawn extent. | 78 | | [Zoom To Feature](https://github.com/tmcgee/cmv-widgets#zoom-to-feature) | A simple widget to provide a drop-down list of features to zoom to on the map. Similar to bookmarks but driven by actual data in a Map Service. | 79 | 80 | ## Geoprocessing, Utilities, and Share Widgets 81 | 82 | | Widget | Description | 83 | | :----: | ----------- | 84 | | [App Settings](https://github.com/roemhildtg/CMV_Widgets#appsettings) | Allows the user to save and share the current state of the map extent and visible layers via localStorage and URL. | 85 | | [Disclaimer](https://github.com/tmcgee/cmv-widgets#disclaimer) | A simple yet configurable disclaimer widget. | 86 | | [ElevationsProfile](https://github.com/ERS-Long/ElevationsProfile) | TitlePane widget to draw elevation profile. | 87 | | [ElevationsProfileTable](https://github.com/goriliukasbuxton/ElevationProfile2) | Bottom Pane widget to draw elevation profile. |(https://github.com/tmcgee/cmv-widgets#attributes-tables) widget or other widgets that have a [dgrid](http://dgrid.io). | 88 | | [Full Motion Video](https://github.com/LG-Spatial/cmv-fmv-widgets) | Full Motion Video widgets for integration with [FMV Server](http://fmvserver.com/shop/uncategorized/full-motion-video-server/). | 89 | | [Geoprocessor](https://github.com/tmcgee/cmv-widgets#geoprocessor) | An example widget demonstrating the display of results from a Geoprocessing Task in the [Attributes Tables](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget. | 90 | | [Google Analytics](https://github.com/jebu75/cmv-google-analytics) | Sends Google Analytics events based on configurable parameters. | 91 | | [Introduction](https://github.com/tmcgee/cmv-widgets#introduction) | The Introduction Widget provides a product tour or tutorial for your application using [IntroJS](https://introjs.com/). | 92 | | [Map Loading](https://github.com/tmcgee/cmv-widgets#map-loading) | A widget to add a `Loading` indicator in the center of the map. | 93 | | [Maptiks](https://github.com/tmcgee/cmv-widgets#maptiks) | A widget to add detailed map analytics to any CMV application using [Maptiks](https://maptiks.com). Maptiks provides in-depth user insights by tracking how visitors click, pan and zoom on your maps. | 94 | | [MessageBox](https://github.com/tmcgee/cmv-widgets#messagebox) | Show an Alert or Confirmation modal dialog box. Intended to be called from other widgets. | 95 | | [Metadata Dialog](https://github.com/roemhildtg/CMV_Widgets#metadatadialog) | Query and display the sublayers metadata dialog using the dynamic sublayer menu. | 96 | | [My Info](https://github.com/ishiland/cmv-widgets#myinfo) | Add HTML to a specified dom node. Intended to be used to display information about your organization in the `sidebarLeft` node. | 97 | | [Print Plus](https://github.com/tmcgee/cmv-widgets#print-plus) | An updated version of the PrintPlus widget originally created by [@LarryStout](https://github.com/LarryStout). | 98 | | [QR Code](https://github.com/tmcgee/cmv-widgets#qr-code) | Shows a QR code for the current map to open mobile applications on your phone/tablet. | 99 | | [Share](https://github.com/tmcgee/cmv-widgets/#share) | Share your map by using Facebook, Twitter, Google+, E-Mail, Link, or embedded iFrame code. | 100 | 101 | ## Contributing 102 | 103 | Create a repo for your widget. To list your widget here, simply add a row to the above widgets table with a link to your repo and description via a Pull Request. 104 | 105 | Please follow these guidelines: 106 | 107 | 1. In your repo include a `README.md` with: 108 | 1. an example configuration object. 109 | 2. additional documentation as needed. 110 | 3. include the CMV version the widget built with. 111 | 2. Make sure to include a screenshot in your `README.md` of your widget in action. 112 | 3. Make sure your code is lint free. Use the included `.jshintrc` file for linting. 113 | --------------------------------------------------------------------------------