├── .gitattributes
├── .gitignore
├── LICENSE.txt
├── README.md
├── screenshot1.png
├── screenshot2.png
└── src
├── .gitattributes
├── .gitignore
├── CHANGELOG.MD
├── LICENSE.txt
├── README.md
├── bower.json
├── css
└── esri-polymer.css
├── elements
├── esri-elements.html
├── esri-featurelayer.html
├── esri-map.html
├── esri-marker-content.html
├── esri-marker-title.html
└── esri-marker.html
├── esri-polymer.html
├── imgs
└── esriGreenPin.png
└── screenshot.png
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | .apdisk
44 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Apache License -- 2.0
2 |
3 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4 |
5 | 1. Definitions.
6 |
7 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
8 |
9 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
10 |
11 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
12 |
13 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
14 |
15 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
16 |
17 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
18 |
19 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
20 |
21 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
22 |
23 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
24 |
25 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
26 |
27 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
28 |
29 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
30 |
31 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
32 |
33 | 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
34 | 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
35 | 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
36 | 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
37 |
38 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
39 |
40 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
41 |
42 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
43 |
44 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
45 |
46 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
47 |
48 | END OF TERMS AND CONDITIONS
49 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #Esri Polymer
2 |
3 | This project has turned Esri ArcGIS JavaScript web maps and asscociated elements into web components that can be used to create maps decleratively to HTML. It leverages Googles Polymer library which allows users to create custom web components.
4 |
5 | The code also includes examples of how to make use of Polymer's variable observation and two way databinding. The example observes zoom level and extent and represents this as inputs on the map which can themselves be changed.
6 |
7 | Feature Layers are supported, and come with a default popup which is just a list of key/value pairs formatted nicely.
8 |
9 | It currently supports:
10 |
11 |
12 | * **esri-map** - Attributes: basemap, zoom, centerLng, centerLat, webMapId (you can use a web map ID to pull through a map)
13 |
14 | * **esri-featurelayer** - Attributes: featurelayer (the feature service url)
15 |
16 | * **esri-marker** - Attributes: lat, lng
17 |
18 | * **esri-marker-title** - Attributes: none - text goes between tags
19 |
20 | * **esri-marker-content** - Attributes: none - text goes between tags
21 |
22 |
23 |
24 | 
25 |
26 | 
27 |
28 |
29 |
30 | #Getting Started
31 |
32 | Install bower if you haven't already using npm:
33 |
34 | npm install -g bower
35 |
36 | Install bower components
37 |
38 | bower install
39 |
40 | Live serve the demo if you so wish (optional):
41 |
42 | npm install live-server
43 | cd src
44 | live-server
45 |
46 | An example of using esri-polymer is shown in the esri-polymer.html page in the repository. Usage is as so:
47 |
48 | ```html
49 |
50 |
51 |
52 | Hello World
53 | Some Content
54 |
55 |
56 | ```
57 |
58 | For generating a web map from an ID:
59 |
60 | ```html
61 |
62 |
63 | ```
64 |
65 |
66 | #Live Demo
67 |
68 | You can see a live demo [here](http://appsstage.esriuk.com/app/developerevangelist/215/wmt/view/d147785761984557b69c73adf4a8e2da/esri-polymer/esri-polymer1.0/esri-polymer.html "Esri Polymer Live Demo")
69 |
70 | It displays one web map constructed using attributes (basemap, zoom, etc), with a feature layer web component nested inside it and a second map constructed with a web map ID.
71 |
72 | #Resources
73 |
74 | - [Polymer Offical](https://www.polymer-project.org/0.5/ "Polymer Offical")
75 | - [Polymer Developer Guide](https://www.polymer-project.org/0.5/docs/polymer/polymer.html "Polymer Developer Guide")
76 | - [Polymer in 10 minutes](https://www.polymer-project.org/0.5/docs/start/creatingelements.html "Polymer in 10 minutes")
77 | - [ArcGIS JavaScript API](https://developers.arcgis.com/javascript/jsapi/ "Esri ArcGIS JavaScript API")
78 | - [ArcGIS for Developers](https://developers.arcgis.com/ "ArcGIS for Developers")
79 | - [A Guide to Web Components](https://css-tricks.com/modular-future-web-components/ "A guide to web components")
80 | - [webcomponents.js](https://github.com/webcomponents/webcomponentsjs "webcomponents.js")
81 | - [Stackoverflow - Polymer](http://stackoverflow.com/search?q=polymer "Stackoverflow - Polymer")
82 |
83 | #Issues
84 |
85 | Find a bug or want to request a new feature? Please let us know by submitting an issue. Thank you!
86 |
87 | #Contributing
88 |
89 | Anyone and everyone is welcome to contribute. Please see our guidelines for contributing.
90 |
91 | #Licensing
92 |
93 | Copyright 2015 Esri UK
94 |
95 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
96 |
97 | http://www.apache.org/licenses/LICENSE-2.0
98 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
99 |
100 | A copy of the license is available in the repository's LICENSE file.
101 |
102 | [](Esri Tags: ArcGIS Web Components Mapping Polymer Google Framework)
103 | [](Esri Language: JavaScript)
104 |
--------------------------------------------------------------------------------
/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EsriUK/esri-polymer/856a1aa3ac12aa6c431d8dd44df925224a87848a/screenshot1.png
--------------------------------------------------------------------------------
/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EsriUK/esri-polymer/856a1aa3ac12aa6c431d8dd44df925224a87848a/screenshot2.png
--------------------------------------------------------------------------------
/src/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | node_modules/
6 | bower_components/
7 |
8 | # Folder config file
9 | Desktop.ini
10 |
11 | # Recycle Bin used on file shares
12 | $RECYCLE.BIN/
13 |
14 | # Windows Installer files
15 | *.cab
16 | *.msi
17 | *.msm
18 | *.msp
19 |
20 | # Windows shortcuts
21 | *.lnk
22 |
23 | # =========================
24 | # Operating System Files
25 | # =========================
26 |
27 | # OSX
28 | # =========================
29 |
30 | .DS_Store
31 | .AppleDouble
32 | .LSOverride
33 |
34 | # Thumbnails
35 | ._*
36 |
37 | # Files that might appear on external disk
38 | .Spotlight-V100
39 | .Trashes
40 |
41 | # Directories potentially created on remote AFP share
42 | .AppleDB
43 | .AppleDesktop
44 | Network Trash Folder
45 | Temporary Items
46 | .apdisk
47 |
--------------------------------------------------------------------------------
/src/CHANGELOG.MD:
--------------------------------------------------------------------------------
1 | Esri Polymer - Change Log
2 |
3 | v 1.3.0
4 | * Upgraded to Polymer v1.2.1
5 | * Fixed cross browser issues using WebComponentsReady
6 | * Upgraded to ArcGIS JavaScript API 3.15
7 |
8 | v 1.2.0
9 | * Upgraded to Polymer v1.1.5 (from v1.0.2)
10 | * Resolved various update issues (dom-element to dom-module etc)
11 | * Removed unnecessary hacky work arounds for dom loading using async as per [documention](https://www.polymer-project.org/1.0/docs/devguide/registering-elements.html#initialization-order)
12 | * Upgraded to ArcGIS JavaScript API 3.14 (from 3.13)
13 |
14 | v 1.1.0
15 |
16 | * Upgraded to Polymer v1.0.0
17 | * Improved handling of low and high zoom levels (endless loop extent changing)
18 | * Added listeners for changes on map attributes (zoom, basemap, lat, lng)
19 |
20 | v 1.0.4
21 |
22 | * Added click-on-feature layer default popup for webMapId constructed maps.
23 | * Changed z-index of added elements (bounding box, zoom level) to not overlay on to popups.
24 |
25 | v 1.0.3
26 |
27 | * Added click-on-feature layer default popup (just uses attributes as content and "Feature" as title)
28 | * Changed font to Nunito
29 |
--------------------------------------------------------------------------------
/src/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Apache License -- 2.0
2 |
3 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4 |
5 | 1. Definitions.
6 |
7 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
8 |
9 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
10 |
11 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
12 |
13 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
14 |
15 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
16 |
17 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
18 |
19 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
20 |
21 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
22 |
23 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
24 |
25 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
26 |
27 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
28 |
29 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
30 |
31 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
32 |
33 | 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
34 | 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
35 | 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
36 | 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
37 |
38 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
39 |
40 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
41 |
42 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
43 |
44 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
45 |
46 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
47 |
48 | END OF TERMS AND CONDITIONS
49 |
--------------------------------------------------------------------------------
/src/README.md:
--------------------------------------------------------------------------------
1 | #Esri Polymer
2 |
3 | This project has turned Esri ArcGIS JavaScript web maps and asscociated elements into web components that can be used to create maps decleratively to HTML. It leverages Googles Polymer library which allows users to create custom web components.
4 |
5 | The code also includes examples of how to make use of Polymer's variable observation and two way databinding. The example observes zoom level and extent and represents this as inputs on the map which can themselves be changed.
6 |
7 | Feature Layers are supported, and come with a default popup which is just a list of key/value pairs formatted nicely.
8 |
9 | It currently supports:
10 |
11 | * **esri-map** - Attributes: basemap, zoom, centerLng, centerLat, webMapId (you can use a web map ID to pull through a map)
12 |
13 | * **esri-featurelayer** - Attributes: featurelayer (the feature service url)
14 |
15 | * **esri-marker** - Attributes: lat, lng
16 |
17 | * **esri-marker-title** - Attributes: none - text goes between tags
18 |
19 | * **esri-marker-content** - Attributes: none - text goes between tags
20 |
21 | 
22 |
23 | #Getting Started
24 |
25 | To setup this project follow these instructions:
26 |
27 | bower install
28 | // Also optionally use live server to serve the demo
29 | npm install -g live-server
30 | live-server
31 |
32 | If you haven't installed bower you can use npm install -g bower:
33 |
34 | An example of using esri-polymer is shown in the esri-polymer.html page in the repository. Usage is as so:
35 |
36 | ``` HTML
37 |
38 |
39 |
40 | Hello World
41 | Some Content
42 |
43 |
44 | ```
45 | For generating a web map from an ID:
46 |
47 | ``` HTML
48 |
49 |
50 | ```
51 |
52 | #Live Demo
53 |
54 | You can see a live demo [here](http://appsstage.esriuk.com/app/developerevangelist/93/wmt/view/d147785761984557b69c73adf4a8e2da/esri-polymer/esri-polymer.html "Esri Polymer Live Demo")
55 |
56 | It displays one web map constructed using attributes (basemap, zoom, etc), with a feature layer web component nested inside it and a second map constructed with a web map ID.
57 |
58 | #Resources
59 |
60 | - [Polymer Offical](https://www.polymer-project.org/0.5/ "Polymer Offical")
61 | - [Polymer Developer Guide](https://www.polymer-project.org/0.5/docs/polymer/polymer.html "Polymer Developer Guide")
62 | - [Polymer in 10 minutes](https://www.polymer-project.org/0.5/docs/start/creatingelements.html "Polymer in 10 minutes")
63 | - [ArcGIS JavaScript API](https://developers.arcgis.com/javascript/jsapi/ "Esri ArcGIS JavaScript API")
64 | - [ArcGIS for Developers](https://developers.arcgis.com/ "ArcGIS for Developers")
65 | - [A Guide to Web Components](https://css-tricks.com/modular-future-web-components/ "A guide to web components")
66 | - [webcomponents.js](https://github.com/webcomponents/webcomponentsjs "webcomponents.js")
67 | - [Stackoverflow - Polymer](http://stackoverflow.com/search?q=polymer "Stackoverflow - Polymer")
68 |
69 | #Issues
70 |
71 | Find a bug or want to request a new feature? Please let us know by submitting an issue. Thank you!
72 |
73 | #Contributing
74 |
75 | Anyone and everyone is welcome to contribute. Please see our guidelines for contributing.
76 |
77 | #Licensing
78 |
79 | Copyright 2015 Esri UK
80 |
81 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
82 |
83 | http://www.apache.org/licenses/LICENSE-2.0
84 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
85 |
86 | A copy of the license is available in the repository's LICENSE file.
87 |
88 | [](Esri Tags: ArcGIS Web Components Mapping Polymer Google Framework)
89 | [](Esri Language: JavaScript)
90 |
--------------------------------------------------------------------------------
/src/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "esri-polymer1.0",
3 | "version": "0.0.0",
4 | "authors": [
5 | "James Milner "
6 | ],
7 | "license": "MIT",
8 | "ignore": [
9 | "**/.*",
10 | "node_modules",
11 | "bower_components",
12 | "test",
13 | "tests"
14 | ],
15 | "dependencies": {
16 | "polymer": "Polymer/polymer"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/css/esri-polymer.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | padding: 0px;
3 | margin: 0px;
4 | border: 0px;
5 | width: 100%;
6 | height: 100%;
7 | overflow: hidden;
8 | font-family: 'Nunito', sans-serif;
9 | }
10 |
11 | esri-map {
12 | width: 800px;
13 | height: 500px;
14 | float:left;
15 | }
16 |
17 | #mapholder {
18 | width: 100%;
19 | height: 100%;
20 | }
21 |
--------------------------------------------------------------------------------
/src/elements/esri-elements.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/elements/esri-featurelayer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/elements/esri-map.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
80 |
81 |