diff options
author | Marten Hogeweg | 2012-06-24 17:36:44 (GMT) |
---|---|---|
committer | Marten Hogeweg | 2012-06-24 17:36:44 (GMT) |
commit | 4c3e57b70afc79390b7d6e7d95c2a98da7aefe26 (patch) | |
tree | e4c227f45c1a5ceccba3525b27bba2e9f18413f7 |
Initial commit
28 files changed, 5615 insertions, 0 deletions
diff --git a/config/config.js b/config/config.js new file mode 100644 index 0000000..c140849 --- /dev/null +++ b/config/config.js @@ -0,0 +1,51 @@ +var configOptions = { + "group":"92595b371efa47e49c1b6c5c216c11bc", + "appid":"", + "theme":"blueTheme", + "siteTitle":"My Gallery", + "siteBannerImage":"", + "mapTitle":"", + "mapSnippet":"", + "mapItemDescription":"", + "homeHeading":"", + "homeSnippet":"", + "homeSideHeading":"Description", + "homeSideContent":"", + "footerHeading":"", + "footerDescription":"", + "footerLogo":"", + "footerLogoUrl":"", + "addThisProfileId":"xa-4f3bf72958320e9e", + "defaultLayout":"grid", + "sortField":"modified", + "sortOrder":"desc", + "searchType":"Web Map", + "mapViewer":"simple", + "galleryItemsPerPage":9, + "showProfileUrl":true, + "showAboutPage":true, + "showSocialButtons":true, + "showFooter":true, + "showBasemapGallery":true, + "showGroupSearch":true, + "showMapSearch":true, + "showLayerToggle":true, + "showLayoutSwitch":true, + "showOverviewMap":true, + "showMoreInfo":true, + "showPagination":true, + "showExplorerButton":true, + "showArcGISOnlineButton":true, + "showMobileButtons":true, + "openGalleryItemsNewWindow":false, + "bingMapsKey":"", + "proxyUrl":"", + "locatorserviceurl":"http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer/", + "geometryserviceurl":"http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer", + "sharingurl":"http://www.arcgis.com/sharing/rest/content/items", + "portalUrl":"http://www.arcgis.com/", + "mobilePortalUrl":"arcgis://www.arcgis.com/", + "iosAppUrl":"itms://itunes.apple.com/us/app/arcgis/id379687930?mt=8", + "androidAppUrl":"https://market.android.com/details?id=com.esri.android.client", + "pointGraphic":"images/ui/bluepoint-21x25.png" +};
\ No newline at end of file diff --git a/css/960.css b/css/960.css new file mode 100644 index 0000000..eaafafe --- /dev/null +++ b/css/960.css @@ -0,0 +1,776 @@ +body { + min-width:960px; +} +.container_12, .container_16 { + margin-left:auto; + margin-right:auto; + width:960px; +} +.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16 { + display:inline; + float:left; + margin-left:10px; + margin-right:10px; +} +.esriRtl .grid_1, .esriRtl .grid_2, .esriRtl .grid_3, .esriRtl .grid_4, .esriRtl .grid_5, .esriRtl .grid_6, .esriRtl .grid_7, .esriRtl .grid_8, .esriRtl .grid_9, .esriRtl .grid_10, .esriRtl .grid_11, .esriRtl .grid_12, .esriRtl .grid_13, .esriRtl .grid_14, .esriRtl .grid_15, .esriRtl .grid_16 { + float: right; +} +.push_1, .pull_1, .push_2, .pull_2, .push_3, .pull_3, .push_4, .pull_4, .push_5, .pull_5, .push_6, .pull_6, .push_7, .pull_7, .push_8, .pull_8, .push_9, .pull_9, .push_10, .pull_10, .push_11, .pull_11, .push_12, .pull_12, .push_13, .pull_13, .push_14, .pull_14, .push_15, .pull_15 { + position:relative; +} +.container_12 .grid_3, .container_16 .grid_4 { + width:220px; +} +.container_12 .grid_6, .container_16 .grid_8 { + width:460px; +} +.container_12 .grid_9, .container_16 .grid_12 { + width:700px; +} +.container_12 .grid_12, .container_16 .grid_16 { + width:940px; +} +.alpha { + margin-left:0; +} +.omega { + margin-right:0; +} +.esriRtl .alpha { + margin-left:10px; + margin-right:0; +} +.esriRtl .omega { + margin-right:10px; + margin-left:0; +} +.sigma { + margin-left:0; + margin-right:0; +} +.container_12 .grid_1 { + width:60px; +} +.container_12 .grid_2 { + width:140px; +} +.container_12 .grid_4 { + width:300px; +} +.container_12 .grid_5 { + width:380px; +} +.container_12 .grid_7 { + width:540px; +} +.container_12 .grid_8 { + width:620px; +} +.container_12 .grid_10 { + width:780px; +} +.container_12 .grid_11 { + width:860px; +} +.container_16 .grid_1 { + width:40px; +} +.container_16 .grid_2 { + width:100px; +} +.container_16 .grid_3 { + width:160px; +} +.container_16 .grid_5 { + width:280px; +} +.container_16 .grid_6 { + width:340px; +} +.container_16 .grid_7 { + width:400px; +} +.container_16 .grid_9 { + width:520px; +} +.container_16 .grid_10 { + width:580px; +} +.container_16 .grid_11 { + width:640px; +} +.container_16 .grid_13 { + width:760px; +} +.container_16 .grid_14 { + width:820px; +} +.container_16 .grid_15 { + width:880px; +} +.container_12 .prefix_3, .container_16 .prefix_4 { + padding-left:240px; +} +.container_12 .prefix_6, .container_16 .prefix_8 { + padding-left:480px; +} +.container_12 .prefix_9, .container_16 .prefix_12 { + padding-left:720px; +} +.container_12 .prefix_1 { + padding-left:80px; +} +.container_12 .prefix_2 { + padding-left:160px; +} +.container_12 .prefix_4 { + padding-left:320px; +} +.container_12 .prefix_5 { + padding-left:400px; +} +.container_12 .prefix_7 { + padding-left:560px; +} +.container_12 .prefix_8 { + padding-left:640px; +} +.container_12 .prefix_10 { + padding-left:800px; +} +.container_12 .prefix_11 { + padding-left:880px; +} +.container_16 .prefix_1 { + padding-left:60px; +} +.container_16 .prefix_2 { + padding-left:120px; +} +.container_16 .prefix_3 { + padding-left:180px; +} +.container_16 .prefix_5 { + padding-left:300px; +} +.container_16 .prefix_6 { + padding-left:360px; +} +.container_16 .prefix_7 { + padding-left:420px; +} +.container_16 .prefix_9 { + padding-left:540px; +} +.container_16 .prefix_10 { + padding-left:600px; +} +.container_16 .prefix_11 { + padding-left:660px; +} +.esriLtr.container_16 .prefix_13 { + padding-left:780px; +} +.container_16 .prefix_14 { + padding-left:840px; +} +.container_16 .prefix_15 { + padding-left:900px; +} +.container_12 .suffix_3, .container_16 .suffix_4 { + padding-right:240px; +} +.esriLtr.container_12 .suffix_6, .container_16 .suffix_8 { + padding-right:480px; +} +.container_12 .suffix_9, .container_16 .suffix_12 { + padding-right:720px; +} +.container_12 .suffix_1 { + padding-right:80px; +} +.container_12 .suffix_2 { + padding-right:160px; +} +.container_12 .suffix_4 { + padding-right:320px; +} +.container_12 .suffix_5 { + padding-right:400px; +} +.container_12 .suffix_7 { + padding-right:560px; +} +.container_12 .suffix_8 { + padding-right:640px; +} +.container_12 .suffix_10 { + padding-right:800px; +} +.container_12 .suffix_11 { + padding-right:880px; +} +.container_16 .suffix_1 { + padding-right:60px; +} +.container_16 .suffix_2 { + padding-right:120px; +} +.container_16 .suffix_3 { + padding-right:180px; +} +.container_16 .suffix_5 { + padding-right:300px; +} +.container_16 .suffix_6 { + padding-right:360px; +} +.container_16 .suffix_7 { + padding-right:420px; +} +.container_16 .suffix_9 { + padding-right:540px; +} +.container_16 .suffix_10 { + padding-right:600px; +} +.container_16 .suffix_11 { + padding-right:660px; +} +.container_16 .suffix_13 { + padding-right:780px; +} +.container_16 .suffix_14 { + padding-right:840px; +} +.container_16 .suffix_15 { + padding-right:900px; +} +.container_12 .push_3, .container_16 .push_4 { + left:240px; +} +.container_12 .push_6, .container_16 .push_8 { + left:480px; +} +.container_12 .push_9, .container_16 .push_12 { + left:720px; +} +.container_12 .push_1 { + left:80px; +} +.container_12 .push_2 { + left:160px; +} +.container_12 .push_4 { + left:320px; +} +.container_12 .push_5 { + left:400px; +} +.container_12 .push_7 { + left:560px; +} +.container_12 .push_8 { + left:640px; +} +.container_12 .push_10 { + left:800px; +} +.container_12 .push_11 { + left:880px; +} +.container_16 .push_1 { + left:60px; +} +.container_16 .push_2 { + left:120px; +} +.container_16 .push_3 { + left:180px; +} +.container_16 .push_5 { + left:300px; +} +.container_16 .push_6 { + left:360px; +} +.container_16 .push_7 { + left:420px; +} +.container_16 .push_9 { + left:540px; +} +.container_16 .push_10 { + left:600px; +} +.container_16 .push_11 { + left:660px; +} +.container_16 .push_13 { + left:780px; +} +.container_16 .push_14 { + left:840px; +} +.container_16 .push_15 { + left:900px; +} +.container_12 .pull_3, .container_16 .pull_4 { + left:-240px; +} +.container_12 .pull_6, .container_16 .pull_8 { + left:-480px; +} +.container_12 .pull_9, .container_16 .pull_12 { + left:-720px; +} +.container_12 .pull_1 { + left:-80px; +} +.container_12 .pull_2 { + left:-160px; +} +.container_12 .pull_4 { + left:-320px; +} +.container_12 .pull_5 { + left:-400px; +} +.container_12 .pull_7 { + left:-560px; +} +.container_12 .pull_8 { + left:-640px; +} +.container_12 .pull_10 { + left:-800px; +} +.container_12 .pull_11 { + left:-880px; +} +.container_16 .pull_1 { + left:-60px; +} +.container_16 .pull_2 { + left:-120px; +} +.container_16 .pull_3 { + left:-180px; +} +.container_16 .pull_5 { + left:-300px; +} +.container_16 .pull_6 { + left:-360px; +} +.container_16 .pull_7 { + left:-420px; +} +.container_16 .pull_9 { + left:-540px; +} +.container_16 .pull_10 { + left:-600px; +} +.container_16 .pull_11 { + left:-660px; +} +.container_16 .pull_13 { + left:-780px; +} +.container_16 .pull_14 { + left:-840px; +} +.container_16 .pull_15 { + left:-900px; +} +.esriRtl .container_12 .prefix_3, .esriRtl .container_16 .prefix_4 { + padding-right:240px; + padding-left:0; +} +.esriRtl .container_12 .prefix_6, .esriRtl .container_16 .prefix_8 { + padding-right:480px; + padding-left:0; +} +.esriRtl .container_12 .prefix_9, .esriRtl .container_16 .prefix_12 { + padding-right:720px; + padding-left:0; +} +.esriRtl .container_12 .prefix_1 { + padding-right:80px; + padding-left:0; +} +.esriRtl .container_12 .prefix_2 { + padding-right:160px; + padding-left:0; +} +.esriRtl .container_12 .prefix_4 { + padding-right:320px; + padding-left:0; +} +.esriRtl .container_12 .prefix_5 { + padding-right:400px; + padding-left:0; +} +.esriRtl .container_12 .prefix_7 { + padding-right:560px; + padding-left:0; +} +.esriRtl .container_12 .prefix_8 { + padding-right:640px; + padding-left:0; +} +.esriRtl .container_12 .prefix_10 { + padding-right:800px; + padding-left:0; +} +.esriRtl .container_12 .prefix_11 { + padding-right:880px; + padding-left:0; +} +.esriRtl .container_16 .prefix_1 { + padding-right:60px; + padding-left:0; +} +.esriRtl .container_16 .prefix_2 { + padding-right:120px; + padding-left:0; +} +.esriRtl .container_16 .prefix_3 { + padding-right:180px; + padding-left:0; +} +.esriRtl .container_16 .prefix_5 { + padding-right:300px; + padding-left:0; +} +.esriRtl .container_16 .prefix_6 { + padding-right:360px; + padding-left:0; +} +.esriRtl .container_16 .prefix_7 { + padding-right:420px; + padding-left:0; +} +.esriRtl .container_16 .prefix_9 { + padding-right:540px; + padding-left:0; +} +.esriRtl .container_16 .prefix_10 { + padding-right:600px; + padding-left:0; +} +.esriRtl .container_16 .prefix_11 { + padding-right:660px; + padding-left:0; +} +.esriRtl.container_16 .prefix_13 { + padding-right:780px; + padding-left:0; +} +.esriRtl .container_16 .prefix_14 { + padding-right:840px; + padding-left:0; +} +.esriRtl .container_16 .prefix_15 { + padding-right:900px; + padding-left:0; +} +.esriRtl .container_12 .suffix_3, .esriRtl .container_16 .suffix_4 { + padding-right:240px; + padding-left:0; +} +.esriRtl.container_12 .suffix_6, .esriRtl .container_16 .suffix_8 { + padding-right:480px; + padding-left:0; +} +.esriRtl .container_12 .suffix_9, .esriRtl .container_16 .suffix_12 { + padding-right:720px; + padding-left:0; +} +.esriRtl .container_12 .suffix_1 { + padding-right:80px; + padding-left:0; +} +.esriRtl .container_12 .suffix_2 { + padding-right:160px; + padding-left:0; +} +.esriRtl .container_12 .suffix_4 { + padding-right:320px; + padding-left:0; +} +.esriRtl .container_12 .suffix_5 { + padding-right:400px; + padding-left:0; +} +.esriRtl .container_12 .suffix_7 { + padding-right:560px; + padding-left:0; +} +.esriRtl .container_12 .suffix_8 { + padding-right:640px; + padding-left:0; +} +.esriRtl .container_12 .suffix_10 { + padding-right:800px; + padding-left:0; +} +.esriRtl .container_12 .suffix_11 { + padding-right:880px; + padding-left:0; +} +.esriRtl .container_16 .suffix_1 { + padding-right:60px; + padding-left:0; +} +.esriRtl .container_16 .suffix_2 { + padding-right:120px; + padding-left:0; +} +.esriRtl .container_16 .suffix_3 { + padding-right:180px; + padding-left:0; +} +.esriRtl .container_16 .suffix_5 { + padding-right:300px; + padding-left:0; +} +.esriRtl .container_16 .suffix_6 { + padding-right:360px; + padding-left:0; +} +.esriRtl .container_16 .suffix_7 { + padding-right:420px; + padding-left:0; +} +.esriRtl .container_16 .suffix_9 { + padding-right:540px; + padding-left:0; +} +.esriRtl .container_16 .suffix_10 { + padding-right:600px; + padding-left:0; +} +.esriRtl .container_16 .suffix_11 { + padding-right:660px; + padding-left:0; +} +.esriRtl .container_16 .suffix_13 { + padding-right:780px; + padding-left:0; +} +.esriRtl .container_16 .suffix_14 { + padding-right:840px; + padding-left:0; +} +.esriRtl .container_16 .suffix_15 { + padding-right:900px; + padding-left:0; +} +.esriRtl .container_12 .push_3, .esriRtl .container_16 .push_4 { + right:240px; + left:auto; +} +.esriRtl .container_12 .push_6, .esriRtl .container_16 .push_8 { + right:480px; + left:auto; +} +.esriRtl .container_12 .push_9, .esriRtl .container_16 .push_12 { + right:720px; + left:auto; +} +.esriRtl .container_12 .push_1 { + right:80px; + left:auto; +} +.esriRtl .container_12 .push_2 { + right:160px; + left:auto; +} +.esriRtl .container_12 .push_4 { + right:320px; + left:auto; +} +.esriRtl .container_12 .push_5 { + right:400px; + left:auto; +} +.esriRtl .container_12 .push_7 { + right:560px; + left:auto; +} +.esriRtl .container_12 .push_8 { + right:640px; + left:auto; +} +.esriRtl .container_12 .push_10 { + right:800px; + left:auto; +} +.esriRtl .container_12 .push_11 { + right:880px; + left:auto; +} +.esriRtl .container_16 .push_1 { + right:60px; + left:auto; +} +.esriRtl .container_16 .push_2 { + right:120px; + left:auto; +} +.esriRtl .container_16 .push_3 { + right:180px; + left:auto; +} +.esriRtl .container_16 .push_5 { + right:300px; + left:auto; +} +.esriRtl .container_16 .push_6 { + right:360px; + left:auto; +} +.esriRtl .container_16 .push_7 { + right:420px; + left:auto; +} +.esriRtl .container_16 .push_9 { + right:540px; + left:auto; +} +.esriRtl .container_16 .push_10 { + right:600px; + left:auto; +} +.esriRtl .container_16 .push_11 { + right:660px; + left:auto; +} +.esriRtl .container_16 .push_13 { + right:780px; + left:auto; +} +.esriRtl .container_16 .push_14 { + right:840px; + left:auto; +} +.esriRtl .container_16 .push_15 { + right:900px; + left:auto; +} +.esriRtl .container_12 .pull_3, .esriRtl .container_16 .pull_4 { + right:-240px; + left:auto; +} +.esriRtl .container_12 .pull_6, .esriRtl .container_16 .pull_8 { + right:-480px; + left:auto; +} +.esriRtl .container_12 .pull_9, .esriRtl .container_16 .pull_12 { + right:-720px; + left:auto; +} +.esriRtl .container_12 .pull_1 { + right:-80px; + left:auto; +} +.esriRtl .container_12 .pull_2 { + right:-160px; + left:auto; +} +.esriRtl .container_12 .pull_4 { + right:-320px; + left:auto; +} +.esriRtl .container_12 .pull_5 { + right:-400px; + left:auto; +} +.esriRtl .container_12 .pull_7 { + right:-560px; + left:auto; +} +.esriRtl .container_12 .pull_8 { + right:-640px; + left:auto; +} +.esriRtl .container_12 .pull_10 { + right:-800px; + left:auto; +} +.esriRtl .container_12 .pull_11 { + right:-880px; + left:auto; +} +.esriRtl .container_16 .pull_1 { + right:-60px; + left:auto; +} +.esriRtl .container_16 .pull_2 { + right:-120px; + left:auto; +} +.esriRtl .container_16 .pull_3 { + right:-180px; + left:auto; +} +.esriRtl .container_16 .pull_5 { + right:-300px; + left:auto; +} +.esriRtl .container_16 .pull_6 { + right:-360px; + left:auto; +} +.esriRtl .container_16 .pull_7 { + right:-420px; + left:auto; +} +.esriRtl .container_16 .pull_9 { + right:-540px; + left:auto; +} +.esriRtl .container_16 .pull_10 { + right:-600px; + left:auto; +} +.esriRtl .container_16 .pull_11 { + right:-660px; + left:auto; +} +.esriRtl .container_16 .pull_13 { + right:-780px; + left:auto; +} +.esriRtl .container_16 .pull_14 { + right:-840px; + left:auto; +} +.esriRtl .container_16 .pull_15 { + right:-900px; + left:auto; +} +.clear { + clear:both; + display:block; + overflow:hidden; + visibility:hidden; + width:0; + height:0; +} +.clearfix:before, .clearfix:after { + content:'\0020'; + display:block; + overflow:hidden; + visibility:hidden; + width:0; + height:0; +} +.clearfix:after { + clear:both; +} +.clearfix { + zoom:1; +} diff --git a/css/common.css b/css/common.css new file mode 100644 index 0000000..c18a152 --- /dev/null +++ b/css/common.css @@ -0,0 +1,1497 @@ +/*-------------------------------------------------- */ +/* GENERAL */ +/*-------------------------------------------------- */ +html { + overflow-y: scroll; +} +html, body { + font-family: Verdana, Geneva, sans-serif; + font-size:13px; + letter-spacing:normal; + line-height:18px; + text-align: left; + outline:0; +} +body { + color:#000; + background-color:#E5E5E5; +} +.esriRtl, .esriRtl body { + text-align: right; +} +.dialogContent { + margin-bottom:20px; +} +h1 { + font-size:44px; + text-shadow: 1px 1px 1px #ffffff; /* Text shadow for newer browsers */ + font-family:Arial, Helvetica, sans-serif; + font-weight: bold; + line-height:52px; + font-variant:normal; + color:#404040; + line-height:normal; + font-variant:normal; + margin-bottom:10px; + margin:0; +} +.mapPage h1 { + font-size:24px; + line-height: normal; +} +#homeSideHeading { + width:180px; + padding:52px 20px 0 20px; +} +#homeSideContent { + width:180px; + padding: 0 20px 20px 20px; +} +h2, h2 a { + font-size:24px; + text-shadow: 1px 1px 3px #ffffff; /* Text shadow for newer browsers */ + font-family:Arial, Helvetica, sans-serif; + font-weight: bold; + line-height:normal; + font-variant:normal; + margin-bottom:4px; + padding:0; + margin:0; + line-height:normal; + font-variant:normal; + text-decoration:none; +} +h2 a:hover, h2 a:focus { + text-decoration:underline; +} +h3, h3 a { + font-size:21px; + text-shadow: 1px 1px 3px #ffffff; /* Text shadow for newer browsers */ + font-family:Arial, Helvetica, sans-serif; + font-weight: bold; + line-height:normal; + font-variant:normal; + margin:15px 0 4px 0; + text-decoration:none; +} +h3 a:hover, h3 a:focus { + text-decoration:underline; +} +h4, h5, h6 { + padding:0; + margin:0; +} +#legendMenu h2, #aboutMenu h2 { + margin:0px 0px 10px 0px; +} +#mapLayerToggle { + margin:0; + padding:0; + border-collapse:collapse; +} +#mapLayerToggle td { + vertical-align:top; + text-align:left; + padding: 0 0 2px 0; +} +.esriRtl #mapLayerToggle td { + text-align: right; +} +#mapLayerToggle .checkColumn { + padding-right:4px; +} +.esriRtl #mapLayerToggle .checkColumn { + padding-right:0; + padding-left:4px; +} +#mapLayerToggle .checkColumn .toggleLayers { + cursor:pointer; +} +#mapLayerToggle label { + display:inline-block; + margin:2px 0; +} +.mapPage h2, .mapPage h2 a { + font-size:18px; + text-decoration:none; +} +.mapPage h2 a:hover, .mapPage h2 a:focus { + text-decoration:underline; +} +.mapPage h3, .mapPage h3 a { + font-size:16px; + text-decoration:none; +} +.mapPage h2 a:hover, .mapPage h2 a:focus { + text-decoration:underline; +} +ul { + list-style:none; +} +ol { + padding-left:20px; +} +a { + text-decoration:none; + outline:0; +} +a:hover, a:focus { + color:#000; + text-decoration:underline; +} +p { + margin-bottom:10px; +} +input[type=search] { + -webkit-appearance: none; +} +input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { + display: none; +} +#mapLayers { + margin-bottom:10px; +} +#descriptionContent { + margin-bottom:10px; +} +/*-------------------------------------------------- */ +/* Alerts */ +/*-------------------------------------------------- */ +.alert { + padding:10px; + border: 1px solid; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-box-shadow: 1px 1px 3px #ccc; + -webkit-box-shadow: 1px 1px 3px #ccc; + box-shadow: 1px 1px 3px #ccc; +} +.info { + color: #00529B; + background-color: #e6f2f8; + border-color:#9fc7db; +} +.info a { + color: #00529B !important; + text-decoration: underline; +} +.success { + color: #4F8A10; + background-color: #eff7e2; + border-color:#adca7e; +} +.success a { + color: #4F8A10 !important; + text-decoration: underline; +} +.warning { + color: #9F6000; + background-color: #f9f1d5; + border-color:#d3bf70; +} +.warning a { + color: #9F6000 !important; + text-decoration: underline; +} +.error { + color: #D8000C; + background-color: #f8e1e1; + border-color:#e4a5a5; +} +.error a { + color: #D8000C !important; + text-decoration: underline; +} +/*-------------------------------------------------- */ +/* Header */ +/*-------------------------------------------------- */ +#header { + position:relative; + z-index:2; +} +#header { + height:75px; + overflow:hidden; + color:#000; + display: none; +} +#header .headerContainer { + background:url(../images/ui/banner.png) no-repeat top left; + _background:none; + height:75px; +} +#header ul { + list-style:none; + margin:0; + padding:0; +} +#header ul li { + display:block; + float:left; + margin:0; + padding:0; + background:none; +} +.esriRtl #header ul li { + float:right; +} +#header ul li a { + color:#fff; + font-size: 13px; + text-decoration:none; + text-align:left; + font-weight:bold; + font-family:Arial, Helvetica, sans-serif; + white-space:nowrap; + -moz-user-select: none; + -webkit-user-select:none; + user-select:none; + outline:0; + margin:0 10px; + padding:27px 20px 13px 20px; + display:inline-block; + line-height:35px; + max-height:75px; + overflow:hidden; +} +.esriRtl #header ul li a { + text-align: right; +} +#header ul li a:hover, #header ul li a:focus { + -webkit-transition:opacity 0.25s ease-in; + -moz-transition:opacity 0.25s ease-in; + -o-transition:opacity 0.25s ease-in; + transition:opacity 0.25s ease-in; + filter:alpha(opacity=75); + opacity:.75; +} +#header ul li .activeLink { + background:url(../images/ui/activeLink.png) left bottom repeat-x; + _background:none; +} +#header ul #homeItem { + margin:0; +} +#header ul #homeItem a { + display:inline-block; + background:none; + max-height:75px; + font-size:35px; + line-height:75px; + height:75px; + padding:0; + margin:0; + overflow:hidden; + text-shadow: 1px 1px 1px #000; /* Text shadow for newer browsers */ + font-family:Arial, Helvetica, sans-serif; + font-weight: bold; + color:#fff; +} +#header ul #homeItem a img { + display:inline-block; + margin:0; + padding:0; + max-height:75px; +} +/*-------------------------------------------------- */ +/* CONTENT */ +/*-------------------------------------------------- */ +#galleryContent { + /* background:#e5e5e5 url(../images/ui/contentBG.jpg) repeat-x top left; */ + background:#ffffff; + color:#404040; + min-height:550px; +} +#galleryContent .contentLeft { + padding:30px 0 50px 0; + position:relative; +} +.socialButtons { + margin-bottom:20px; + min-width: 138px; +} +.itemLeft { + float:left; +} +.itemRight { + float:right; +} +.esriRtl .itemLeft { + float:right; +} +.esriRtl .itemRight { + float:left; +} +/*-------------------------------------------------- */ +/* FEATURED MAPS */ +/*-------------------------------------------------- */ +#featuredMaps { + margin:20px 0; +} +.featuredLoading { + margin:20px 0; + padding-left:21px; + height:16px; + background:url(../images/ui/ajax-loader.gif) no-repeat left center; +} +/*-------------------------------------------------- */ +/* LAYOUT TOGGLE */ +/*-------------------------------------------------- */ +#layoutAndSearch { + margin: 20px 0 0 0; +} +.toggleLayout li { + float:right; +} +.esriRtl .toggleLayout li { + float:left; +} +.toggleLayout .active { + font-weight:bold; +} +.toggleLayout .gridView { + display:inline-block; + width:11px; + height:11px; + overflow:hidden; + background:url(../images/ui/uiSprite.png) no-repeat -96px 0; + _background:url(../images/ui/uiSprite.gif) no-repeat -96px 0; +} +.toggleLayout .active .gridView { + background:url(../images/ui/uiSprite.png) no-repeat -128px 0; + _background:url(../images/ui/uiSprite.gif) no-repeat -128px 0; +} +.toggleLayout .listView { + display:inline-block; + width:13px; + height:11px; + overflow:hidden; + background:url(../images/ui/uiSprite.png) no-repeat -112px 0; + _background:url(../images/ui/uiSprite.gif) no-repeat -112px 0; +} +.toggleLayout .active .listView { + background:url(../images/ui/uiSprite.png) no-repeat -144px 0; + _background:url(../images/ui/uiSprite.gif) no-repeat -144px 0; +} +.spinnerRemove { + margin:0 10px; + width:16px; + height: 26px; + display:block; +} +.loadingAjax { + display:inline-block; + vertical-align:middle; + cursor:default; + border:0; + width:16px; + height: 26px; + margin:0; + background:url(../images/ui/ajax-loader.gif) no-repeat center center; +} +#resetGroupSearch { + cursor:pointer; +} +#resetGroupSearch:hover, #resetGroupSearch:focus { + text-decoration:underline; +} +#groupSortOptions { + margin:20px 0 0 0; +} +/*-------------------------------------------------- */ +/* MAPS GRID */ +/*-------------------------------------------------- */ +.mapsGrid .item { + width:200px; + margin: 0 7px 20px 7px; + background:#fff; + padding:3px; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-box-shadow: 0px 0px 6px #ccc; + -webkit-box-shadow: 0px 0px 6px #ccc; + box-shadow: 0px 0px 6px #ccc; + display:block; + border:0; + text-decoration:none; + color:#404040; + outline:0; + cursor:pointer; +} +.mapsGrid .item:hover, .mapsGrid .item:focus { + -moz-box-shadow: 0px 0px 6px #999; + -webkit-box-shadow: 0px 0px 6px #999; + box-shadow: 0px 0px 6px #999; + -webkit-transition:-webkit-box-shadow 0.25s ease-in; + -moz-transition:-moz-box-shadow 0.25s ease-in; + -o-transition:box-shadow 0.25s ease-in; + transition:box-shadow 0.25s ease-in; +} +.mapsGrid .item .summaryHidden { + zoom:1; + position:absolute; + width:190px; + height:123px; + opacity:0; + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"; + filter:alpha(opacity=0); + padding:5px; + background:#fff; + z-index:2; + display:block; + overflow:hidden; + font-size:11px; +} +.mapsGrid .item .summaryHidden strong { + display:block; +} +.mapsGrid .item:hover .summaryHidden, .mapsGrid .item:focus .summaryHidden { + -webkit-transition:opacity 0.25s ease-in; + -moz-transition:opacity 0.25s ease-in; + -o-transition:opacity 0.25s ease-in; + transition:opacity 0.25s ease-in; + opacity:.9; + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=90)"; + filter:alpha(opacity=90); +} +.mapsGrid .alpha .item { + margin-right:14px; + margin-left:0; +} +.mapsGrid .omega .item { + margin-right:0; + margin-left:14px; +} +.esriRtl .mapsGrid .alpha .item { + margin-right:0; + margin-left:14px; +} +.esriRtl .mapsGrid .omega .item { + margin-right:14px; + margin-left:0; +} +.mapsGrid .item .gridImg { + width:200px; + height:133px; + display:block; + overflow:hidden; + background:#fff url(../images/ui/ajax-loader.gif) no-repeat center center; + opacity:1; +} +.mapsGrid .item:hover .gridImg, .mapsGrid .item:focus .gridImg { + background-image:none; + opacity:0.75; + -webkit-transition:opacity 0.25s ease-in; + -moz-transition:opacity 0.25s ease-in; + -o-transition:opacity 0.25s ease-in; + transition:opacity 0.25s ease-in; +} +.mapsGrid .item .itemTitle { + display:block; + padding:5px; + width:190px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + -ms-text-overflow: ellipsis; +} +.mapsGrid .externalLink { + position:relative; +} +.mapsGrid .externalLink .externalIcon { + display: block; + zoom:1; + position:absolute; + z-index:3; + top:0; + right:0; + background:#fff url(../images/ui/external.png) no-repeat top right; + padding: 0 0 3px 3px; + margin: 0; + width:13px; + height:12px; + overflow: hidden; + -webkit-border-radius: 0 0 0 3px; + border-radius: 0 0 0 3px; +} +.esriRtl .mapsGrid .externalLink .externalIcon { + right:auto; + left:0; + padding: 0 3px 3px 0; + background-position: top left; + -webkit-border-radius: 0 0 3px 0; + border-radius: 0 0 3px 0; +} +/*-------------------------------------------------- */ +/* MAPS LIST */ +/*-------------------------------------------------- */ +.mapsList .item { + background:#fff; + margin:0 0 10px 0; + padding:3px; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-box-shadow: 0px 0px 6px #ccc; + -webkit-box-shadow: 0px 0px 6px #ccc; + box-shadow: 0px 0px 6px #ccc; +} +.mapsList .item .block { + display:block; + float: left; + width:200px; + height:133px; + overflow:hidden; +} +.esriRtl .mapsList .item .block { + float:right; +} +.mapsList .externalLink .block { + position:relative; +} +.mapsList .externalLink .externalIcon { + display: block; + zoom:1; + position:absolute; + z-index:2; + top:0; + right:0; + background:#fff url(../images/ui/external.png) no-repeat top right; + padding: 0 0 3px 3px; + margin: 0; + width:13px; + height:12px; + overflow: hidden; + -webkit-border-radius: 0 0 0 3px; + border-radius: 0 0 0 3px; +} +.esriRtl .mapsList .externalLink .externalIcon { + right:auto; + left:0; + padding: 0 3px 3px 0; + background-position: top left; + -webkit-border-radius: 0 0 3px 0; + border-radius: 0 0 3px 0; +} +.mapsList .item .itemInfo { + float:left; + width:474px; + margin: 0 0 0 10px; +} +.esriRtl .mapsList .item .itemInfo { + float:right; + margin: 0 10px 0 0; +} +.mapsList .item .itemInfo a { + outline:0; + color:#404040; +} +.mapsList .item .itemInfo strong { + display:block; +} +.mapsList .item .itemInfo strong a { + text-decoration:none; +} +.mapsList .item .itemInfo p a { + text-decoration:underline; +} +.mapsList .item .itemInfo a:hover, .mapsList .item .itemInfo a:focus { + color:#999; + text-decoration:none; +} +.mapsList .item .itemInfo p { + margin:0 0 6px 0; +} +.mapsList .item .block img { + width:200px; + height:133px; + display:block; + overflow: hidden; + opacity:1; + background:#fff url(../images/ui/ajax-loader.gif) no-repeat center center; +} +.mapsList .block:hover img, .mapsList .block:focus img { + background-image:none; + opacity:.75; + -webkit-transition:opacity 0.25s ease-in; + -moz-transition:opacity 0.25s ease-in; + -o-transition:opacity 0.25s ease-in; + transition:opacity 0.25s ease-in; +} +.mapsList .item .itemInfo .ratingCon { + color:#656565; + font-size: 11px; + line-height:16px; + margin-bottom:5px; +} +.mapsList .item .itemInfo .dateInfo { + color:#656565; + font-size: 11px; + line-height:normal; +} +/*-------------------------------------------------- */ +/* DATA LAYERS */ +/*-------------------------------------------------- */ +.dataLayers { + background:#f1f1f1 url(../images/ui/dataLayers.jpg) repeat-x top left; + padding:30px 0 50px 0; + -moz-box-shadow: 0px 1px 10px #999; + -webkit-box-shadow: 0px 1px 10px #999; + box-shadow: 0px 1px 10px #999; + line-height:18px; + position:relative; +} +.dataLayers ul li { + margin-bottom:10px; +} +.dataLayers .moreInfoList { + margin:10px 0; +} +.dataLayers .moreInfoList li { + margin:0 0 5px 0; +} +.dataLayers ul li a { + text-decoration:none; +} +.dataLayers ul li a:hover, .dataLayers ul li a:focus { + text-decoration:underline; +} +.dataLayers .dataLayersButton { + margin:30px 0; +} +.dataLayers .blackText { + color:#000; +} +/*-------------------------------------------------- */ +/* SEARCH */ +/*-------------------------------------------------- */ +#mapSearch { + width:190px; +} +.searchList { + margin:0; + padding:0; + list-style:none; +} +.searchList li { + float:left; +} +.esriRtl .searchList li { + float:right; +} +.searchList .iconInput { + display:inline-block; + vertical-align:middle; + position:relative; + height:24px; + background:#fff; + border-top:1px solid #eee; + border-bottom:1px solid #eee; + -webkit-border-radius: 5px 0 0 5px; + border-radius:5px 0 0 5px; + -moz-box-shadow: 0px 0px 6px #ccc; + -webkit-box-shadow: 0px 0px 6px #ccc; + box-shadow: 0px 0px 6px #ccc; +} +.esriRtl .searchList .iconInput { + -webkit-border-radius: 0 5px 5px 0; + border-radius:0 5px 5px 0; +} +.autoCompleteOpen .iconInput { + -webkit-border-radius: 5px 0 0 0; + border-radius: 5px 0 0 0; +} +.esriRtl .autoCompleteOpen .iconInput { + -webkit-border-radius: 0 5px 0 0; + border-radius:0 5px 0 0; +} +.autoCompleteOpen #searchGoupButton { + -webkit-border-radius: 0 5px 0 0; + border-radius: 0 5px 0 0; +} +.esriRtl .autoCompleteOpen #searchGoupButton { + -webkit-border-radius: 5px 0 0 0; + border-radius: 5px 0 0 0; +} +.searchList .searchButton { + display:inline-block; + width:12px; + height:12px; + overflow:hidden; + background:url(../images/ui/uiSprite.png) no-repeat -82px -1px; + _background:url(../images/ui/uiSprite.gif) no-repeat -82px -1px; +} +.searchList .iconInput .iconReset { + display:none; +} +.searchList .iconInput .resetActive { + display:block; + position:absolute; + right:5px; + top:3px; + width:16px; + height:16px; + z-index:2; + overflow:hidden; + cursor:pointer; + background:url(../images/ui/uiSprite.png) no-repeat -64px 0; + _background:url(../images/ui/uiSprite.gif) no-repeat -64px 0; +} +.esriRtl .searchList .iconInput .resetActive { + right:auto; + left:5px; +} +.searchList .iconInput .resetActive:hover, .searchList .iconInput .resetActive:focus { + opacity:0.75; + -webkit-transition:opacity 0.25s ease-in; + -moz-transition:opacity 0.25s ease-in; + -o-transition:opacity 0.25s ease-in; + transition:opacity 0.25s ease-in; +} +.searchList .iconInput input { + width:159px; + outline:0; + display:inline-block; + border:0; + border-collapse:collapse; + vertical-align:middle; + font-size:12px; + line-height:14px; + font-weight:normal; + margin:0; + padding:5px 0; + height:14px; + position:absolute; + left:5px; + top:0; + color:#000; + text-align: left; + background:none; +} +.esriRtl .searchList .iconInput input { + left:auto; + right:5px; + text-align: right; +} + + +/*-------------------------------------------------- */ +/* MAP TEMPLATE */ +/*-------------------------------------------------- */ +.addressContainer { + display:block; + margin: 20px 0; +} +#fullScreen { + display:block; + position:absolute; + top:10px; + right:10px; + z-index:30; +} +.fullScreenButton { + display:inline-block; + width:12px; + height:12px; + overflow:hidden; + background:url(../images/ui/uiSprite.png) no-repeat -2px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -2px -2px; +} +#subtitle { + line-height:18px; + margin-bottom:10px; +} +#geoButton { + display:block; + position:absolute; + top:10px; + right:58px; + z-index:30; +} +.geoLocateButton { + display:inline-block; + width:12px; + height:12px; + overflow:hidden; + background:url(../images/ui/uiSprite.png) no-repeat -162px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -162px -2px; +} +.basemapConRel { + position: relative; + z-index:31; +} +#basemapButton { + display: block; + float: right; +} +.esriRtl #basemapButton { + float:left; +} +#basemapButton.open { + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; + cursor: pointer !important; +} +#basemapGallery { + display: none; + position:absolute; + z-index:31; + background: #fff; + top:100%; + right:0; + width: 375px; + height: 350px; + overflow: auto; + padding: 10px; + -webkit-border-radius: 5px 0px 5px 5px; + border-radius: 5px 0px 5px 5px; + -moz-box-shadow: 1px 1px 3px #666; + -webkit-box-shadow: 1px 1px 3px #666; + box-shadow: 1px 1px 3px #666; +} +.esriRtl #basemapGallery { + right:auto; + left: 0; + -webkit-border-radius: 0 5px 5px 5px; + border-radius: 0 5px 5px 5px; +} +.basemapArrowButton { + display:inline-block; + vertical-align:text-bottom; + width:12px; + height:12px; + overflow:hidden; + margin-right:2px; + background:url(../images/ui/uiSprite.png) no-repeat -194px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -194px -2px; +} +.buttonSelected .basemapArrowButton { + background:url(../images/ui/uiSprite.png) no-repeat -178px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -178px -2px; +} +.esriRtl .basemapArrowButton { + margin-right:0; + margin-left:2px; +} +/*-------------------------------------------------- */ +/* MAP TAB MENU*/ +/*-------------------------------------------------- */ +#tabMenu { + margin:0 20px 20px 20px; +} +#tabMenu .toggleButton { + float:left; +} +.esriRtl #tabMenu .toggleButton { + float:right; +} +.tabMenu { + display:none; +} +.defaultMenu { + display:block; +} +#legendMenu, #aboutMenu { + position:relative; +} +#legendMenu .esriLegendLayerLabel { + font-weight:bold; + margin-bottom:2px; +} +#legendMenu .esriLegendLayer td { + line-height:normal; + vertical-align:middle; +} +#legendMenu .esriLegendLayer img { + margin-right:5px; +} +.esriRtl #legendMenu .esriLegendLayer img { + margin-right:0; + margin-left:5px; +} +/*-------------------------------------------------- */ +/* MAP */ +/*-------------------------------------------------- */ +.mapContainer { + background:#fff; + padding:3px; + -webkit-border-radius: 5px; + border-radius: 5px; + width: 694px; + height: 584px; + position:relative; +} +#map { + text-align: left; + direction: ltr; + width:694px; + height:584px; + position:relative; + background:#fff url(../images/ui/ajax-loader.gif) no-repeat center center; +} +#map.mapLoaded { + background-image:none !important; +} +.esriScalebar { + padding-left:15px; +} +.map .bingLogo-lg { + left:18px !important; +} +#accessInformation .credits { + margin:5px 0 0 0; + font-size:10px; + color:#656565; +} +#mapButtonCon { + margin:20px 0 0 0; +} +/*-------------------------------------------------- */ +/* MAP PAGE */ +/*-------------------------------------------------- */ +#description, #legendDiv { + width:180px; + padding: 0 20px 20px 20px; + zoom:1; +} +#mapButtons .mapButton { + margin-left:10px; +} +.esriRtl #mapButtons .mapButton { + margin-left:0; + margin-right:10px; +} +/*-------------------------------------------------- */ +/* BUTTONS */ +/*-------------------------------------------------- */ +.silverButton, .pagination .disabled:hover, .pagination .disabled:focus { + zoom: 1; + display:inline-block; + vertical-align:middle; + font-size:12px; + line-height:14px; + height:14px; + margin:0; + padding:6px 10px; + color:#5f5f5f; + background: #ffffff; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2UzZTNlMyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjM2MzYzMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #ffffff 0%, #e3e3e3 50%, #c3c3c3 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(50%, #e3e3e3), color-stop(100%, #c3c3c3)); + background: -webkit-linear-gradient(top, #ffffff 0%, #e3e3e3 50%, #c3c3c3 100%); + background: -o-linear-gradient(top, #ffffff 0%, #e3e3e3 50%, #c3c3c3 100%); + background: -ms-linear-gradient(top, #ffffff 0%, #e3e3e3 50%, #c3c3c3 100%); + background: linear-gradient(top, #ffffff 0%, #e3e3e3 50%, #c3c3c3 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#c3c3c3', GradientType=0 ); + text-decoration:none; + cursor:pointer; + font-weight:normal; + white-space:nowrap; + -moz-user-select: none; + -webkit-user-select:none; + user-select:none; + outline:0; + -moz-box-shadow: 0px 0px 6px #ccc; + -webkit-box-shadow: 0px 0px 6px #ccc; + box-shadow: 0px 0px 6px #ccc; +} +.pagination .disabled, .pagination .disabled:hover, .pagination .disabled:focus { + cursor: default; +} +.silverButton:hover, .silverButton:focus { + background: #c3c3c3; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2MzYzNjMyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2UzZTNlMyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #c3c3c3 0%, #e3e3e3 50%, #ffffff 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #c3c3c3), color-stop(50%, #e3e3e3), color-stop(100%, #ffffff)); + background: -webkit-linear-gradient(top, #c3c3c3 0%, #e3e3e3 50%, #ffffff 100%); + background: -o-linear-gradient(top, #c3c3c3 0%, #e3e3e3 50%, #ffffff 100%); + background: -ms-linear-gradient(top, #c3c3c3 0%, #e3e3e3 50%, #ffffff 100%); + background: linear-gradient(top, #c3c3c3 0%, #e3e3e3 50%, #ffffff 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c3c3c3', endColorstr='#ffffff', GradientType=0 ); +} +.active .silverButton { + color:#fff; + cursor:default; + background: #5a5a5a; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVhNWE1YSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzY5Njk2OSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM3YjdiN2IiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5a5a5a), color-stop(50%, #696969), color-stop(100%, #7b7b7b)); + background: -webkit-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: -o-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: -ms-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5a5a5a', endColorstr='#7b7b7b', GradientType=0 ); +} +.mapButton { + zoom: 1; + display:inline-block; + vertical-align:middle; + font-size:12px; + line-height:14px; + height:14px; + margin:0; + padding:6px 13px; + border:0; + color:#fff; + text-decoration:none; + cursor:pointer; + font-weight:normal; + white-space:nowrap; + -moz-user-select: none; + -webkit-user-select:none; + user-select:none; + outline:0; + -moz-box-shadow: 0px 0px 6px #ccc; + -webkit-box-shadow: 0px 0px 6px #ccc; + box-shadow: 0px 0px 6px #ccc; +} +.mapButton:hover, .mapButton:focus { + text-decoration:none; + color:#fff; +} +.toggleButton { + display:inline-block; + vertical-align:middle; + font-size:12px; + line-height:normal; + margin:0; + padding:7px 13px; + border:0; + color:#000; + text-decoration:none; + cursor:pointer; + font-weight:normal; + white-space:nowrap; + -moz-user-select: none; + -webkit-user-select:none; + user-select:none; + outline:0; + background: #dbdbdb; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RiZGJkYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ0JSIgc3RvcC1jb2xvcj0iI2NiY2JjYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNiOWI5YjkiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #dbdbdb 0%, #cbcbcb 44%, #b9b9b9 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dbdbdb), color-stop(44%, #cbcbcb), color-stop(100%, #b9b9b9)); + background: -webkit-linear-gradient(top, #dbdbdb 0%, #cbcbcb 44%, #b9b9b9 100%); + background: -o-linear-gradient(top, #dbdbdb 0%, #cbcbcb 44%, #b9b9b9 100%); + background: -ms-linear-gradient(top, #dbdbdb 0%, #cbcbcb 44%, #b9b9b9 100%); + background: linear-gradient(top, #dbdbdb 0%, #cbcbcb 44%, #b9b9b9 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dbdbdb', endColorstr='#b9b9b9', GradientType=0 ); + border-top:1px solid #fff; + border-bottom:none; + -moz-box-shadow: 0px 0px 6px #ccc; + -webkit-box-shadow: 0px 0px 6px #ccc; + box-shadow: 0px 0px 6px #ccc; +} +.toggleButton:hover, .toggleButton:focus { + border-top:none; + border-bottom:1px solid #fff; + background: #b9b9b9; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2I5YjliOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjU2JSIgc3RvcC1jb2xvcj0iI2NiY2JjYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkYmRiZGIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #b9b9b9 0%, #cbcbcb 56%, #dbdbdb 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #b9b9b9), color-stop(56%, #cbcbcb), color-stop(100%, #dbdbdb)); + background: -webkit-linear-gradient(top, #b9b9b9 0%, #cbcbcb 56%, #dbdbdb 100%); + background: -o-linear-gradient(top, #b9b9b9 0%, #cbcbcb 56%, #dbdbdb 100%); + background: -ms-linear-gradient(top, #b9b9b9 0%, #cbcbcb 56%, #dbdbdb 100%); + background: linear-gradient(top, #b9b9b9 0%, #cbcbcb 56%, #dbdbdb 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b9b9b9', endColorstr='#dbdbdb', GradientType=0 ); +} +.buttonSelected, .buttonSelected:hover, .buttonSelected:focus { + cursor:default; + border-bottom:none; + color:#fff !important; +} +.buttonRight { + -webkit-border-radius: 0px 5px 5px 0px; + border-radius: 0px 5px 5px 0px; +} +.buttonLeft { + -webkit-border-radius: 5px 0px 0px 5px; + border-radius: 5px 0px 0px 5px; +} +.esriRtl .buttonRight { + -webkit-border-radius: 5px 0px 0px 5px; + border-radius: 5px 0px 0px 5px; +} +.esriRtl .buttonLeft { + -webkit-border-radius: 0px 5px 5px 0px; + border-radius: 0px 5px 5px 0px; +} +.buttonSingle { + -webkit-border-radius: 5px; + border-radius:5px; +} +/*-------------------------------------------------- */ +/* FULSCREEN */ +/*-------------------------------------------------- */ +.fullScreen, .fullScreen body { + width:100%; + height:100%; + min-width:100%; +} +.fullScreen #fullScreen { + right:242px; +} +.fullScreen .fullScreenButton { + background:url(../images/ui/uiSprite.png) no-repeat -50px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -50px -2px; +} +.fullScreen #geoButton { + right:290px; +} +.fullScreen .container_12, .fullScreen #content, .fullScreen #content .contentLeft, .fullScreen .container_12 .grid_9, .fullScreen .container_12 .grid_12 { + width:100% !important; + height:100% !important; + padding:0 !important; + margin:0 !important; + display:block !important; + overflow:hidden !important; + background:none !important; + min-height:100% !important; +} +.fullScreen #header, .fullScreen .fullScreen .socialButtons { + display:none !important; +} +.fullScreen .dataLayers { + position:static; +} +.fullScreen #legendMenu { + display: block !important; + position:absolute; + z-index:38; + top:10px; + right:10px; + background:#F1F1F1; +} +.fullScreen #aboutMenu { + display: none !important; +} +.fullScreen #description, .fullScreen #legendDiv { + padding:20px; +} +.fullScreen .scrollHeight { + height: 400px !important; + max-height:400px !important; + zoom:1; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-box-shadow: 1px 1px 3px #666; + -webkit-box-shadow: 1px 1px 3px #666; + box-shadow: 1px 1px 3px #666; +} +.fullScreen .mapContainer { + padding:0 !important; + margin:0 !important; + width:100% !important; + height:100% !important; + overflow:hidden !important; + -webkit-border-radius: 0 !important; + border-radius: 0 !important; +} +.fullScreen .searchListCon { + position:absolute; + z-index:38; + top:10px; + margin: 0; + left:75px; +} +.fullScreen .addressContainer, .fullScreen .searchList { + margin:0; +} +.fullScreen #title { + display:none; +} +.fullScreen #map { + padding:0 !important; + margin:0 !important; + width:100% !important; + height:100% !important; + overflow:hidden !important; +} +.fullScreen #subtitle { + display:none; +} +.fullScreen .basemapConRel { + position: absolute; + top:10px; + right:338px; + z-index:38; +} +/*-------------------------------------------------- */ +/* Pagination */ +/*-------------------------------------------------- */ +.pagination { + margin:0 0 20px 0; +} +.pagination ul { + list-style:none; + margin:0; + padding:0; +} +.pagination ul li { + float:left; + display:block; + font-size:12px; + line-height:14px; + margin:0; +} +.esriRtl .pagination ul li { + float:right; +} +.pagination ul .default { + display:inline-block; + padding:5px; + cursor:pointer; + background:#dadada; + border-top:1px solid #c4c4c4; + border-bottom:1px solid #c4c4c4; + width:30px; + text-align:center; + -moz-box-shadow: 6px 0px 6px #ccc; + -webkit-box-shadow: 6px 0px 6px #ccc; + box-shadow: 6px 0px 6px #ccc; +} +.esriRtl .pagination ul .default { + -moz-box-shadow: -6px 0px 6px #ccc; + -webkit-box-shadow: -6px 0px 6px #ccc; + box-shadow: -6px 0px 6px #ccc; +} +.pagination ul .default:hover, .pagination ul .default:focus { + background-color:#ccc; + color:#333; + -webkit-transition:background-color 0.25s ease-in; + -moz-transition:background-color 0.25s ease-in; + -o-transition:background-color 0.25s ease-in; + transition:background-color 0.25s ease-in; +} +.pagination ul .selected, .pagination ul .selected:hover, .pagination ul .selected:focus { + cursor:default; + font-weight:bold; + color:#fff; + background: #5a5a5a; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVhNWE1YSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzY5Njk2OSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM3YjdiN2IiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5a5a5a), color-stop(50%, #696969), color-stop(100%, #7b7b7b)); + background: -webkit-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: -o-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: -ms-linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); + background: linear-gradient(top, #5a5a5a 0%, #696969 50%, #7b7b7b 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5a5a5a', endColorstr='#7b7b7b', GradientType=0 ); + border-bottom:1px solid #6a6a6a; + border-top:1px solid #6a6a6a; +} +.pagination ul .next span { + display:inline-block; + background:url(../images/ui/uiSprite.png) no-repeat -35px -1px; + _background:url(../images/ui/uiSprite.gif) no-repeat -35px -1px; + height:12px; + width:12px; + overflow:hidden; +} +.pagination ul .previous span { + display:inline-block; + background:url(../images/ui/uiSprite.png) no-repeat -18px -1px; + _background:url(../images/ui/uiSprite.gif) no-repeat -18px -1px; + height:12px; + width:12px; + overflow:hidden; +} +.esriRtl .pagination ul .next span { + background:url(../images/ui/uiSprite.png) no-repeat -18px -1px; + _background:url(../images/ui/uiSprite.gif) no-repeat -18px -1px; +} +.esriRtl .pagination ul .previous span { + background:url(../images/ui/uiSprite.png) no-repeat -35px -1px; + _background:url(../images/ui/uiSprite.gif) no-repeat -35px -1px; +} +/*-------------------------------------------------- */ +/* AUTO COMPLETE LIST */ +/*-------------------------------------------------- */ +#acCon { + position:relative; + z-index:39; +} +.autoComplete { + width:190px; + position:absolute; + top:0; + left:0; + z-index:39; + background:#fff; + font-size:12px; + -webkit-box-shadow: 1px 1px 3px #999; + -moz-box-shadow: 1px 1px 3px #999; + box-shadow: 1px 1px 3px #999; + -webkit-border-radius: 0px 0px 8px 8px; + border-radius: 0px 0px 8px 8px; + display:none; +} +.esriRtl .autoComplete { + left:auto; + right:0; +} +.autoComplete p { + margin:6px 0; + padding:6px 10px; +} +.autoComplete ul { + margin:6px 0; +} +.autoComplete li { + padding: 6px 10px; + cursor:pointer; +} +.autoComplete li span { + font-weight:bold; +} +/*-------------------------------------------------- */ +/* Zebra stripes */ +/*-------------------------------------------------- */ +.zebraStripes .stripe { + background-color: #eee; +} +/*-------------------------------------------------- */ +/* About Page */ +/*-------------------------------------------------- */ +#thumbnailUrl { + text-align: center; +} +.ownerImage { + display: inline-block; + margin:0 0 5px 0; + -webkit-border-radius: 5px; + border-radius: 5px; +} +.ownerImage:hover, .ownerImage:focus { + -webkit-transition:-webkit-box-shadow 0.25s ease-in; + -moz-transition:-moz-box-shadow 0.25s ease-in; + -o-transition:box-shadow 0.25s ease-in; + transition:box-shadow 0.25s ease-in; +} +.ownerImage img { + display: block; + -webkit-border-radius: 5px; + border-radius: 5px; + background:url(../images/ui/ajax-loader.gif) no-repeat center center; + opacity:1; +} +.ownerImage:hover img, .ownerImage:focus img { + background-image:none; + opacity:0.75; + -webkit-transition:opacity 0.25s ease-in; + -moz-transition:opacity 0.25s ease-in; + -o-transition:opacity 0.25s ease-in; + transition:opacity 0.25s ease-in; +} +/*-------------------------------------------------- */ +/* RTL */ +/*-------------------------------------------------- */ +.esriRtl { + direction: rtl; +} +/*-------------------------------------------------- */ +/* Sorting */ +/*-------------------------------------------------- */ +#sortGallery li { + float:left; +} +.esriRtl #sortGallery li { + float:right; +} +#sortGallery .active .silverButton { + cursor:pointer !important; +} +#sortGallery .label { + margin-right:10px; +} +.esriRtl #sortGallery .label { + margin-right:0; + margin-left:10px; +} +#sortGallery .label span { + display:inline-block; + vertical-align:center; + font-size:12px; + line-height:14px; + padding:6px 0; +} +#sortGallery li .arrow { + display:inline-block; + vertical-align:text-bottom; + width:12px; + height:12px; + overflow:hidden; + margin-left:4px; +} +.esriRtl #sortGallery li .arrow { + margin-left:0; + margin-right:4px; +} +#sortGallery .desc .arrow { + background:url(../images/ui/uiSprite.png) no-repeat -178px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -178px -2px; +} +#sortGallery .desc:hover .arrow, #sortGallery .desc:focus .arrow { + background:url(../images/ui/uiSprite.png) no-repeat -178px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -178px -2px; +} +#sortGallery .asc .arrow { + background:url(../images/ui/uiSprite.png) no-repeat -242px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -242px -2px; +} +#sortGallery .asc:hover .arrow, #sortGallery .asc:focus .arrow { + background:url(../images/ui/uiSprite.png) no-repeat -242px -2px; + _background:url(../images/ui/uiSprite.gif) no-repeat -242px -2px; +} +/*-------------------------------------------------- */ +/* Comments */ +/*-------------------------------------------------- */ +#comments { + margin:20px 0 0 0; +} +#comments h2 { + margin-bottom:10px; +} +#comments .comment { + background:#fff; + padding:10px; + margin-bottom:10px; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-box-shadow: 1px 1px 3px #ccc; + -webkit-box-shadow: 1px 1px 3px #ccc; + box-shadow: 1px 1px 3px #ccc; +} +#comments .comment .smallText { + color:#656565; + font-size: 11px; +} +/*-------------------------------------------------- */ +/* Scroll Div */ +/*-------------------------------------------------- */ +.scrollHeight { + overflow:auto; + zoom:1; + margin:0; + padding:0; + width:220px; +} +/*-------------------------------------------------- */ +/* Media Queries */ +/*-------------------------------------------------- */ +@media only screen and (max-width: 940px) { +.fullScreen .basemapConRel { + display: none !important; +} +} +@media only screen and (max-width: 620px) { +.fullScreen .searchListCon, .fullScreen .basemapConRel, .fullScreen #fullScreen, .fullScreen #geoButton { + display: none !important; +} +} +@media only screen and (max-width: 570px) { +.fullScreen .searchListCon, .fullScreen .basemapConRel, .fullScreen #legendMenu, .fullScreen #fullScreen, .fullScreen #geoButton, #map .dijitSlider { + display: none !important; +} +} +/*-------------------------------------------------- */ +/* END */ +/*-------------------------------------------------- */ diff --git a/css/ie9.css b/css/ie9.css new file mode 100644 index 0000000..ce37ffa --- /dev/null +++ b/css/ie9.css @@ -0,0 +1,3 @@ +.gradient, .disabled, .toggleButton, .silverButton, .mapButton, .buttonSelected, .buttonLeft, .buttonRight, .buttonSingle, .esriPopup .titlePane, .dj_ie7 .esriPopup .titlePane .title { + filter: none !important; +} diff --git a/css/reset.css b/css/reset.css new file mode 100644 index 0000000..726fccc --- /dev/null +++ b/css/reset.css @@ -0,0 +1,102 @@ +/* +html5doctor.com Reset Stylesheet +v1.6.1 +Last Updated: 2010-09-17 +Author: Richard Clark - http://richclarkdesign.com +Twitter: @rich_clark +*/ + +html, body, div, span, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +abbr, address, cite, code, +del, dfn, em, img, ins, kbd, q, samp, +small, strong, sub, sup, var, +b, i, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, figcaption, figure, +footer, header, hgroup, menu, nav, section, summary, +time, mark, audio, video { + margin:0; + padding:0; + border:0; + outline:0; + font-size:100%; + vertical-align:baseline; + background:transparent; +} + +body { + line-height:1; +} + +article,aside,details,figcaption,figure, +footer,header,hgroup,menu,nav,section { + display:block; +} + +nav ul { + list-style:none; +} + +blockquote, q { + quotes:none; +} + +blockquote:before, blockquote:after, +q:before, q:after { + content:''; + content:none; +} + +a { + margin:0; + padding:0; + font-size:100%; + vertical-align:baseline; + background:transparent; +} + +/* change colours to suit your needs */ +ins { + background-color:#ff9; + color:#000; + text-decoration:none; +} + +/* change colours to suit your needs */ +mark { + background-color:#ff9; + color:#000; + font-style:italic; + font-weight:bold; +} + +del { + text-decoration: line-through; +} + +abbr[title], dfn[title] { + border-bottom:1px dotted; + cursor:help; +} + +table { + border-collapse:collapse; + border-spacing:0; +} + +/* change border colour to suit your needs */ +hr { + display:block; + height:1px; + border:0; + border-top:1px solid #cccccc; + margin:1em 0; + padding:0; +} + +input, select { + vertical-align:middle; +} diff --git a/css/themes.css b/css/themes.css new file mode 100644 index 0000000..672c7c7 --- /dev/null +++ b/css/themes.css @@ -0,0 +1,260 @@ +/*-------------------------------------------------- */ +/* RED THEME */ +/*-------------------------------------------------- */ +.redTheme { + display:block; +} +.redTheme .mapHeader, .redTheme h2, .redTheme h2 a, .redTheme a, .redTheme h3, .redTheme h3 a { + color:#d15929; +} +.redTheme #header { + display: block; + background: #d86932; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q4NjkzMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhYTFmMGMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #d86932 0%, #aa1f0c 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d86932), color-stop(100%, #aa1f0c)); + background: -webkit-linear-gradient(top, #d86932 0%, #aa1f0c 100%); + background: -o-linear-gradient(top, #d86932 0%, #aa1f0c 100%); + background: -ms-linear-gradient(top, #d86932 0%, #aa1f0c 100%); + background: linear-gradient(top, #d86932 0%, #aa1f0c 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d86932', endColorstr='#aa1f0c', GradientType=0 ); +} +.redTheme .mapButton { + color:#fff; + background: #db652c; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RiNjUyYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ0JSIgc3RvcC1jb2xvcj0iI2M1NDQxNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhZjIzMDIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #db652c), color-stop(44%, #c54417), color-stop(100%, #af2302)); + background: -webkit-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: -o-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: -ms-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#db652c', endColorstr='#af2302', GradientType=0 ); +} +.redTheme .mapButton:hover, .redTheme .buttonSelected, .redTheme .buttonSelected:hover, .redTheme .mapButton:focus, .redTheme .buttonSelected:focus { + background: #af2302; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2FmMjMwMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjU2JSIgc3RvcC1jb2xvcj0iI2M1NDQxNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkYjY1MmMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #af2302 0%, #c54417 56%, #db652c 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #af2302), color-stop(56%, #c54417), color-stop(100%, #db652c)); + background: -webkit-linear-gradient(top, #af2302 0%, #c54417 56%, #db652c 100%); + background: -o-linear-gradient(top, #af2302 0%, #c54417 56%, #db652c 100%); + background: -ms-linear-gradient(top, #af2302 0%, #c54417 56%, #db652c 100%); + background: linear-gradient(top, #af2302 0%, #c54417 56%, #db652c 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#af2302', endColorstr='#db652c', GradientType=0 ); +} +.redTheme .autoComplete li:hover, .redTheme .autoComplete li:focus { + background-color: #db652c; + color:#fff; +} +.esriPopup.redTheme .titlePane { + border-color:#901b01; + background: #db652c; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RiNjUyYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ0JSIgc3RvcC1jb2xvcj0iI2M1NDQxNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhZjIzMDIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #db652c), color-stop(44%, #c54417), color-stop(100%, #af2302)); + background: -webkit-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: -o-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: -ms-linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); + background: linear-gradient(top, #db652c 0%, #c54417 44%, #af2302 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#db652c', endColorstr='#af2302', GradientType=0 ); + color: #fff; + font-weight: 700; +} +.dj_ie7 .esriPopup.redTheme .titlePane, .dj_ie7 .esriPopup.redTheme .titlePane .title { + background: #db652c; +} +.esriPopup.redTheme .titlePane { + border-color:#901b01; +} +.esriPopup.redTheme a { + color: #d15929; +} +.esriPopup.redTheme .contentPane, .esriPopup.redTheme .actionsPane { + color:#404040; +} +.esriPopup.redTheme .contentPane, .esriPopup.redTheme .actionsPane { + border-color:#901b01; +} +/*-------------------------------------------------- */ +/* blueTheme THEME */ +/*-------------------------------------------------- */ +.blueTheme { + display:block; +} +.blueTheme .mapHeader, .blueTheme h2, .blueTheme h2 a, .blueTheme a, .blueTheme h3, .blueTheme h3 a { + color:#2c65a7; +} +.blueTheme #header { + display: block; + background: #1478c3; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzE0NzhjMyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwODFiM2UiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #1478c3 0%, #081b3e 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #1478c3), color-stop(100%, #081b3e)); + background: -webkit-linear-gradient(top, #1478c3 0%, #081b3e 100%); + background: -o-linear-gradient(top, #1478c3 0%, #081b3e 100%); + background: -ms-linear-gradient(top, #1478c3 0%, #081b3e 100%); + background: linear-gradient(top, #1478c3 0%, #081b3e 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1478c3', endColorstr='#081b3e', GradientType=0 ); +} +.blueTheme .mapButton { + color:#fff; + background: #1393ff; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzEzOTNmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDRlOWEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #1393ff), color-stop(100%, #004e9a)); + background: -webkit-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: -o-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: -ms-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: linear-gradient(top, #1393ff 0%, #004e9a 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1393ff', endColorstr='#004e9a', GradientType=0 ); +} +.blueTheme .mapButton:hover, .blueTheme .buttonSelected, .blueTheme .buttonSelected:hover, .blueTheme .mapButton:focus, .blueTheme .buttonSelected:focus { + background: #004e9a; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwNGU5YSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxMzkzZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #004e9a 0%, #1393ff 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #004e9a), color-stop(100%, #1393ff)); + background: -webkit-linear-gradient(top, #004e9a 0%, #1393ff 100%); + background: -o-linear-gradient(top, #004e9a 0%, #1393ff 100%); + background: -ms-linear-gradient(top, #004e9a 0%, #1393ff 100%); + background: linear-gradient(top, #004e9a 0%, #1393ff 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#004e9a', endColorstr='#1393ff', GradientType=0 ); +} +.blueTheme .autoComplete li:hover, .blueTheme .autoComplete li:focus { + background-color: #1393ff; + color:#fff; +} +.esriPopup.blueTheme .titlePane { + border-color:#0f8bf6; + background: #1393ff; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzEzOTNmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDRlOWEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #1393ff), color-stop(100%, #004e9a)); + background: -webkit-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: -o-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: -ms-linear-gradient(top, #1393ff 0%, #004e9a 100%); + background: linear-gradient(top, #1393ff 0%, #004e9a 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1393ff', endColorstr='#004e9a', GradientType=0 ); + color: #fff; + font-weight: 700; +} +.dj_ie7 .esriPopup.blueTheme .titlePane, .dj_ie7 .esriPopup.blueTheme .titlePane .title { + background: #1393ff; +} +.esriPopup.blueTheme .titlePane { + border-color:#0f8bf6; +} +.esriPopup.blueTheme a { + color: #2c65a7; +} +.esriPopup.blueTheme .contentPane, .esriPopup.blueTheme .actionsPane { + color:#404040; +} +.esriPopup.blueTheme .contentPane, .esriPopup.blueTheme .actionsPane { + border-color:#0f8bf6; +} +/*-------------------------------------------------- */ +/* GREEN THEME */ +/*-------------------------------------------------- */ +.greenTheme { + display:block; +} +.greenTheme .mapHeader, .greenTheme h2, .greenTheme h2 a, .greenTheme a, .greenTheme h3, .greenTheme h3 a { + color:#2a7433; +} +.greenTheme #header { + display: block; + background: #339340; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMzOTM0MCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwNzQ0MGMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #339340 0%, #07440c 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #339340), color-stop(100%, #07440c)); + background: -webkit-linear-gradient(top, #339340 0%, #07440c 100%); + background: -o-linear-gradient(top, #339340 0%, #07440c 100%); + background: -ms-linear-gradient(top, #339340 0%, #07440c 100%); + background: linear-gradient(top, #339340 0%, #07440c 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#339340', endColorstr='#07440c', GradientType=0 ); +} +.greenTheme .mapButton { + color:#fff; + background: #6fbf7d; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzZmYmY3ZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwZjUzMTQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6fbf7d), color-stop(100%, #0f5314)); + background: -webkit-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: -o-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: -ms-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: linear-gradient(top, #6fbf7d 0%, #0f5314 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6fbf7d', endColorstr='#0f5314', GradientType=0 ); +} +.greenTheme .mapButton:hover, .greenTheme .buttonSelected, .greenTheme .buttonSelected:hover, .greenTheme .mapButton:focus, .greenTheme .buttonSelected:focus { + background: #0f5314; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzBmNTMxNCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM2ZmJmN2QiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #0f5314 0%, #6fbf7d 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0f5314), color-stop(100%, #6fbf7d)); + background: -webkit-linear-gradient(top, #0f5314 0%, #6fbf7d 100%); + background: -o-linear-gradient(top, #0f5314 0%, #6fbf7d 100%); + background: -ms-linear-gradient(top, #0f5314 0%, #6fbf7d 100%); + background: linear-gradient(top, #0f5314 0%, #6fbf7d 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0f5314', endColorstr='#6fbf7d', GradientType=0 ); +} +.greenTheme .autoComplete li:hover, .greenTheme .autoComplete li:focus { + background-color: #6fbf7d; + color:#fff; +} +.esriPopup.greenTheme .titlePane { + border-color:#6FBF7D; + background: #6fbf7d; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzZmYmY3ZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwZjUzMTQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6fbf7d), color-stop(100%, #0f5314)); + background: -webkit-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: -o-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: -ms-linear-gradient(top, #6fbf7d 0%, #0f5314 100%); + background: linear-gradient(top, #6fbf7d 0%, #0f5314 100%); +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6fbf7d', endColorstr='#0f5314', GradientType=0 ); + color: #fff; + font-weight: 700; +} +.dj_ie7 .esriPopup.greenTheme .titlePane, .dj_ie7 .esriPopup.greenTheme .titlePane .title { + background: #6fbf7d; +} +.esriPopup.greenTheme .titlePane { + border-color:#6FBF7D; +} +.esriPopup.greenTheme a { + color: #2a7433; +} +.esriPopup.greenTheme .contentPane, .esriPopup.greenTheme .actionsPane { + color:#404040; +} +.esriPopup.greenTheme .contentPane, .esriPopup.greenTheme .actionsPane { + border-color:#6FBF7D; +} +/*-------------------------------------------------- */ +/* CUSTOM THEME */ +/*-------------------------------------------------- */ +.custom { + display:block; +} +.custom .mapHeader, .custom h2, .custom h2 a, .custom a, .custom h3, .custom h3 a { +} +.custom #header { + display: block; +} +.custom .mapButton { +} +.custom .mapButton:hover, .custom .buttonSelected, .custom .buttonSelected:hover, .custom .mapButton:focus, .custom .buttonSelected:focus { +} +.custom .autoComplete li:hover, .custom .autoComplete li:focus { +} +.esriPopup.custom .titlePane { +} +.dj_ie7 .esriPopup.custom .titlePane, .dj_ie7 .esriPopup.custom .titlePane .title { +} +.esriPopup.custom .titlePane { +} +.esriPopup.custom a { +} +.esriPopup.custom .contentPane, .esriPopup.custom .actionsPane { +} +.esriPopup.custom .contentPane, .esriPopup.custom .actionsPane { +} diff --git a/esri_mapgallery.info b/esri_mapgallery.info new file mode 100644 index 0000000..d35b23f --- /dev/null +++ b/esri_mapgallery.info @@ -0,0 +1,9 @@ +name = Esri Map Gallery +title = Esri Map Gallery +package = ArcGIS Modules +description = This module provides Map Galleries of content from ArcGIS Online as well as an embeddable viewer. +core = "7.x" +version = "1.0 Beta" + +; NEW LINE +configure = admin/config/content/esri_mapgallery
\ No newline at end of file diff --git a/esri_mapgallery.install b/esri_mapgallery.install new file mode 100644 index 0000000..4e43ea0 --- /dev/null +++ b/esri_mapgallery.install @@ -0,0 +1,44 @@ +<?php + +function esri_mapgallery_install() { + drupal_install_schema('galleries'); +} + +function esri_mapgallery_uninstall() { + drupal_uninstall_schema('galleries'); +} + +function esri_mapgallery_schema() { + $schema['galleries'] = array( + 'description' => 'Example map gallery module', + 'fields' => array( + 'vid' => array ( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0 + ), + 'nid' => array ( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0 + ), + 'count' => array ( + 'type' => 'int', + 'not null' => TRUE, + 'default' => '9' + ), + 'groupid' => array ( + 'type' => 'varchar', + 'length' => 50, + 'not null' => TRUE, + 'default' => 'c755678be14e4a0984af36a15f5b643e' + ), + ), + 'primary key' => array('vid'), + ); + + return $schema; +} +
\ No newline at end of file diff --git a/esri_mapgallery.module b/esri_mapgallery.module new file mode 100644 index 0000000..5996646 --- /dev/null +++ b/esri_mapgallery.module @@ -0,0 +1,161 @@ +<?php + +/** + * @file + * Module file for esri_mapgallery_module. + */ + +/** + * @defgroup esri_mapgallery Example: Page + * @ingroup ArcGIS + * @{ + * This example demonstrates how a module can display a map gallery at a given URL. + * + */ + +/** + * Implements hook_help(). + */ +function esri_mapgallery_help($path, $arg) { + switch ($path) { + case 'arcgis/about': + // Help text for the simple page registered for this path. + return t('This is help text for the ArcGIS Online module for Drupal.'); + + case 'arcgis/map': + // Help text for the simple page registered for this path. + return t('This is help text for the Webmap Page.'); + + case 'arcgis/gallery': + // Help text for the simple page registered for this path. + return t('This is help text for the Gallery page.'); + + case 'admin/help#esri_mapgallery': + // Help text for the admin section, using the module name in the path. + return t('This is help text created in the page example\'s second case.'); + } +} + +/** + * Implements hook_permission(). + */ +function esri_mapgallery_permission() { + return array( + 'access map page' => array( + 'title' => t('Access map page'), + 'description' => t('Allow users to access the Webmap Viewer page'), + ), + 'access gallery page' => array( + 'title' => t('Access gallery page'), + 'description' => t('Allow users to access the Map Gallery page'), + ), + ); +} + +/** + * Implements hook_theme(). + */ +function esri_mapgallery_theme() { + return array( + 'gallery' => array( + 'template' => 'gallery', + 'variables' => array('title' => NULL, 'groupID' => '69b91f7b857b40a484c4aacbd1b243a7'), + ), + ); +} + + +/** + * Implements hook_menu(). + * + * @see hook_menu() + * @see menu_example + */ +function esri_mapgallery_menu() { + + // This is the minimum information you can provide for a menu item. This menu + // item will be created in the default menu, usually Navigation. + $items['arcgis/about'] = array( + 'title' => 'Map Gallery', + 'page callback' => 'esri_mapgallery_description', + 'access callback' => TRUE, + 'expanded' => TRUE, + ); + + // Webmap Page with simple map template + $items['arcgis/map/%'] = array( + 'title' => 'ArcGIS Online Map', + 'page callback' => 'esri_mapgallery_map', + 'page arguments' => array(2), + 'access arguments' => array('access simple map page'), + ); + + // Gallery URL with groupid, page size, and start page + $items['arcgis/gallery/%'] = array( + 'page callback' => 'esri_mapgallery_gallery', + 'page arguments' => array(2), + 'access arguments' => array('access arguments page'), + 'type' => MENU_CALLBACK, + ); + + return $items; +} + +/** + * Constructs a descriptive page. + */ +function esri_mapgallery_description() { + return array('#markup' => t('The esri_mapgallery provides two pages, "map" and "gallery". The <a href="@map_link">map page</a> just returns a renderable array for display. The <a href="@gallery_link">arguments page</a> takes two arguments and displays them, as in @gallery_link', array('@map_link' => url('arcgis/map/d4a907a736404636a4f6a9875a19aa8a', array('absolute' => TRUE)), '@gallery_link' => url('arcgis/gallery/5/7', array('absolute' => TRUE))))); +} + +/** + * Constructs a simple webmap page. + */ +function esri_mapgallery_map($mapid) { + + // TODO: replace with the nice map page from the gallery sample + + $content = ''. + '<iframe width="500" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"' . + ' src="http://www.arcgis.com/home/webmap/embedViewer.html?webmap=@mapid' . + ' &zoom=true"></iframe><br />'. + ' <small><a href="http://www.arcgis.com/home/webmap/viewer.html?webmap=@mapid' . + ' " style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small>'; + + return array('#markup' => t($content, array('@mapid' => $mapid) )); +} + +/** + * Gallery page callback. + */ +function esri_mapgallery_gallery($groupID) { + // $groupID = group id for which the gallery will be created + + // TODO: Make sure you don't trust the URL to be safe! Always check for exploits. + //if (!is_numeric($count) || !is_numeric($pageNum)) { + // // We will just show a standard "access denied" page in this case. + // drupal_access_denied(); + // return; // We actually don't get here. + //} + + // get paths + $modulePath = drupal_get_path('module', 'esri_mapgallery'); + + $build['esri_mapgallery_gallery'] = array( + '#theme' => 'gallery', + '#title' => '', + '#groupID' => $groupID + ); + $build['esri_mapgallery_gallery']['#attached']['library'][] = array('system', 'ui.galleryBody'); + + // insert a call to a function + $build['esri_mapgallery_gallery']['#attached']['js'][] = array('data' => '(function($){$(function() { setConfigOptions(\'' . $groupID . '\'); })})(jQuery);', 'type' => 'inline'); + $output = drupal_render($build); + return $output; + + + +} +/** + * @} End of "defgroup esri_mapgallery". + */ diff --git a/gallery.tpl.php b/gallery.tpl.php new file mode 100644 index 0000000..c1f6346 --- /dev/null +++ b/gallery.tpl.php @@ -0,0 +1,98 @@ +<?php + +/** + * @file + * Template file for gallery. + */ + +?> +<script type="text/javascript"> +var configOptions; + +function setConfigOptions(groupID) { + configOptions = { + "group":groupID, + "appid":"", + "theme":"blueTheme", + "siteTitle":"", + "siteBannerImage":"", + "mapTitle":"", + "mapSnippet":"", + "mapItemDescription":"", + "homeHeading":"", + "homeSnippet":"", + "homeSideHeading":"Description", + "homeSideContent":"", + "footerHeading":"", + "footerDescription":"", + "footerLogo":"", + "footerLogoUrl":"", + "addThisProfileId":"xa-4f3bf72958320e9e", + "defaultLayout":"list", + "sortField":"modified", + "sortOrder":"desc", + "searchType":"Web Map", + "mapViewer":"drupal", + "galleryItemsPerPage":9, + "showProfileUrl":true, + "showAboutPage":false, + "showSocialButtons":true, + "showFooter":false, + "showBasemapGallery":false, + "showGroupSearch":true, + "showMapSearch":true, + "showLayerToggle":true, + "showLayoutSwitch":true, + "showOverviewMap":true, + "showMoreInfo":true, + "showPagination":true, + "showExplorerButton":false, + "showArcGISOnlineButton":false, + "showMobileButtons":false, + "openGalleryItemsNewWindow":false, + "bingMapsKey":"", + "proxyUrl":"", + "locatorserviceurl":"http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer/", + "geometryserviceurl":"http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer", + "sharingurl":"http://www.arcgis.com/sharing/rest/content/items", + "portalUrl":"http://www.arcgis.com/", + "mobilePortalUrl":"arcgis://www.arcgis.com/", + "iosAppUrl":"itms://itunes.apple.com/us/app/arcgis/id379687930?mt=8", + "androidAppUrl":"https://market.android.com/details?id=com.esri.android.client", + "pointGraphic":"images/ui/bluepoint-21x25.png" + } +} +</script> +<!-- STYLESHEETS --> +<link href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dijit/themes/claro/claro.css" rel="stylesheet" type="text/css" /> +<link href="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/css/reset.css" rel="stylesheet" type="text/css" /> +<link href="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/css/960.css" rel="stylesheet" type="text/css" /> +<link href="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/css/common.css" rel="stylesheet" type="text/css" /> +<link href="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/css/themes.css" rel="stylesheet" type="text/css" /> +<!--[if gte IE 9]> +<link href="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/css/ie9.css" rel="stylesheet" type="text/css" /> +<![endif]--> + +<!-- JAVASCRIPT --> +<script type="text/javascript" src="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/javascript/djConfig.js"></script> +<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script> +<script type="text/javascript" src="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/javascript/common.js"></script> +<script type="text/javascript" src="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'esri_mapgallery'); ?>/javascript/home/layout.js"></script> +<!-- END JAVASCRIPT --> + + <div id="galleryContent"> + <div class="container_12"> + <div id="mainPanel" class="grid_9"> + <h1 id="homeHeading"></h1> + <p id="homeSnippet"></p> + <div id="layoutAndSearch"></div> + <div id="featuredMaps"> + <p id="featuredLoading" class="featuredLoading"></p> + </div> + <div class="clear"></div> + <div class="grid_6 alpha"> + <div id="maps_pagination" class="pagination"></div> + </div> + </div> + </div> + </div> diff --git a/images/ui/activeLink.png b/images/ui/activeLink.png Binary files differnew file mode 100644 index 0000000..f4b13b6 --- /dev/null +++ b/images/ui/activeLink.png diff --git a/images/ui/ajax-loader.gif b/images/ui/ajax-loader.gif Binary files differnew file mode 100644 index 0000000..1560b64 --- /dev/null +++ b/images/ui/ajax-loader.gif diff --git a/images/ui/banner.png b/images/ui/banner.png Binary files differnew file mode 100644 index 0000000..316c499 --- /dev/null +++ b/images/ui/banner.png diff --git a/images/ui/bluepoint-21x25.png b/images/ui/bluepoint-21x25.png Binary files differnew file mode 100644 index 0000000..57c883c --- /dev/null +++ b/images/ui/bluepoint-21x25.png diff --git a/images/ui/contentBG.jpg b/images/ui/contentBG.jpg Binary files differnew file mode 100644 index 0000000..05d5768 --- /dev/null +++ b/images/ui/contentBG.jpg diff --git a/images/ui/dataLayers.jpg b/images/ui/dataLayers.jpg Binary files differnew file mode 100644 index 0000000..3937c29 --- /dev/null +++ b/images/ui/dataLayers.jpg diff --git a/images/ui/external.png b/images/ui/external.png Binary files differnew file mode 100644 index 0000000..7c61c62 --- /dev/null +++ b/images/ui/external.png diff --git a/images/ui/footerBG.jpg b/images/ui/footerBG.jpg Binary files differnew file mode 100644 index 0000000..2717b01 --- /dev/null +++ b/images/ui/footerBG.jpg diff --git a/images/ui/logoBorder.jpg b/images/ui/logoBorder.jpg Binary files differnew file mode 100644 index 0000000..79e8b2c --- /dev/null +++ b/images/ui/logoBorder.jpg diff --git a/images/ui/logoBorderRTL.jpg b/images/ui/logoBorderRTL.jpg Binary files differnew file mode 100644 index 0000000..eb46fcf --- /dev/null +++ b/images/ui/logoBorderRTL.jpg diff --git a/images/ui/uiSprite.gif b/images/ui/uiSprite.gif Binary files differnew file mode 100644 index 0000000..33f34c2 --- /dev/null +++ b/images/ui/uiSprite.gif diff --git a/images/ui/uiSprite.png b/images/ui/uiSprite.png Binary files differnew file mode 100644 index 0000000..9007e18 --- /dev/null +++ b/images/ui/uiSprite.png diff --git a/javascript/about/layout.js b/javascript/about/layout.js new file mode 100644 index 0000000..68f8c8b --- /dev/null +++ b/javascript/about/layout.js @@ -0,0 +1,122 @@ +// Dojo Requires +dojo.require("esri.arcgis.utils"); +dojo.require("esri.IdentityManager"); +dojo.require("esri.arcgis.Portal"); +dojo.require("dojo.NodeList-manipulate"); +dojo.require("dojo.NodeList-traverse"); +dojo.require("dojox.NodeList.delegate"); +dojo.require("dijit.Dialog"); +dojo.require("dojo.io.script"); +dojo.require("dojo.number"); +/*------------------------------------*/ +// on dojo load +/*------------------------------------*/ +dojo.addOnLoad(function(){ + // set default configuration options + setDefaultConfigOptions(); + // set app ID settings and call init after + setAppIdSettings(function(){ + // create portal + createPortal(function(){ + init(); + }); + }); +}); +/*------------------------------------*/ +// Query Owner +/*------------------------------------*/ +function queryOwnerInfo(obj){ + // default values + var settings = { + // Group Owner + owner: '', + // format + dataType : 'json', + // callback function with object + callback: null + }; + // If options exist, lets merge them with our default settings + if(obj) { + dojo.mixin(settings, obj); + } + var q = 'username:' + settings.owner; + var params = { + q: q, + v: configOptions.arcgisRestVersion, + f: settings.dataType + }; + portal.queryUsers(params).then(function(data){ + if(typeof settings.callback === 'function'){ + // call callback function with settings and data + settings.callback.call(this, settings, data); + } + }); +} +/*------------------------------------*/ +// place about content into dom +/*------------------------------------*/ +function insertAboutContent(userInfo){ + var node, html; + if(userInfo){ + // users full name + node = dojo.byId('fullName'); + if(userInfo.fullName){ + setNodeHTML(node, userInfo.fullName); + } + // users description + node = dojo.byId('userDescription'); + if(userInfo.description){ + setNodeHTML(node, userInfo.description); + } + // users thumbnail + node = dojo.byId('thumbnailUrl'); + html = ''; + if(userInfo.thumbnailUrl){ + if(configOptions.showProfileUrl){ + html += '<a class="ownerImage" href="' + getViewerURL('owner_page') + '" target="_blank">'; + } + else{ + html += '<span class="ownerImage">'; + } + html += '<img alt="' + userInfo.fullName + '" title="' + userInfo.fullName + '" src="' + userInfo.thumbnailUrl + '" width="150" height="150" />'; + if(configOptions.showProfileUrl){ + html += '</a>'; + } + else{ + html += '</span>'; + } + } + if(configOptions.showProfileUrl && userInfo.username){ + html += '<div><a href="' + getViewerURL('owner_page') + '" target="_blank">' + userInfo.username + '</a></div>'; + } + setNodeHTML(node, html); + } +} +/*------------------------------------*/ +// Init +/*------------------------------------*/ +function init(){ + // Query group and then query maps + queryGroup(function(){ + // query group info + queryOwnerInfo({ + // Group Owner + owner: configOptions.groupOwner, + // Executed after ajax returned + callback: function(obj,data){ + if(data.results.length > 0){ + // place about content into dom + insertAboutContent(data.results[0]); + } + else{ + // show error dialog + var dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.noMatches + }); + dialog.show(); + } + } + }); + }); +}
\ No newline at end of file diff --git a/javascript/common.js b/javascript/common.js new file mode 100644 index 0000000..04fbfd8 --- /dev/null +++ b/javascript/common.js @@ -0,0 +1,984 @@ +/*------------------------------------*/ +// Add Spinner +/*------------------------------------*/ +function addSpinner(id){ + var html = '<div class="spinnerRemove"><div class="loadingAjax"></div></div>'; + var node = dojo.byId(id); + setNodeHTML(node, html); +} +/*------------------------------------*/ +// Reverse sort order +/*------------------------------------*/ +function reverseSortOrder(order){ + if(order === 'desc'){ + return 'asc'; + } + // else + return 'desc'; +} +/*------------------------------------*/ +// Remove Spinner +/*------------------------------------*/ +function removeSpinner(){ + dojo.query('.spinnerRemove').orphan(); +} +/*------------------------------------*/ +// Hide all content +/*------------------------------------*/ +function hideAllContent(){ + var node = dojo.byId('content'); + setNodeHTML(node, ''); +} +/*------------------------------------*/ +// App ID Settings +/*------------------------------------*/ +function setAppIdSettings(callback){ + if(configOptions.appid){ + var requestHandle = esri.request({ + url: configOptions.sharingurl + "/" + configOptions.appid + "/data", + content: { + f: "json" + }, + callbackParamName: "callback", + // on load + load: function (response) { + // check for false value strings + var appSettings = setFalseValues(response.values); + // set other config options from app id + dojo.mixin(configOptions, appSettings); + // callback function + if(typeof callback === 'function'){ + // call callback function + callback.call(this); + } + }, + // on error + error: function (response) { + var error = response.message; + // show error dialog + var dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.createMap + " : " + error + }); + dialog.show(); + // hide all content + hideAllContent(); + } + }); + } + else{ + // callback function + if(typeof callback === 'function'){ + // call callback function + callback.call(this); + } + } +} +/*------------------------------------*/ +// Clear address function +/*------------------------------------*/ +function clearAddress(obj){ + // empty value + obj.attr('value', ""); + // get reset node + var iconReset = obj.next('.iconReset'); + // remove active class + iconReset.removeClass('resetActive'); + // add default class + obj.addClass('default'); +} +/*------------------------------------*/ +// Checks to see if address is populated +/*------------------------------------*/ +function checkAddressStatus(obj){ + // get value of node + var cAVal = dojo.query(obj).attr('value')[0]; + // get reset node + var iconReset = dojo.query(obj).next('.iconReset'); + // if value is not empty + if(cAVal !== ''){ + // add reset class + iconReset.addClass('resetActive'); + } +} +/*------------------------------------*/ +// Set default options for the template +/*------------------------------------*/ +function setDefaultConfigOptions(){ + // set user agent + setUserAgent(); + // set up params + configUrlParams(); + // set localization + i18n = dojo.i18n.getLocalization("esriTemplate", "template"); + + // if RTL + if(window.dojoConfig.locale && window.dojoConfig.locale.indexOf("ar") !== -1) { + //right now checking for Arabic only, to generalize for all RTL languages + configOptions.isRightToLeft = true; // configOptions.isRightToLeft property setting to true when the locale is 'ar' + } + // Template Version. Used for development and version recognition. + configOptions.templateVersion = "2.05a"; + // ArcGIS Rest Version + configOptions.arcgisRestVersion = 1; + // row items + configOptions.galleryPerRow = 3; + // Set geometry to HTTPS if protocol is used + if(configOptions.geometryserviceurl && location.protocol === "https:") { + configOptions.geometryserviceurl = configOptions.geometryserviceurl.replace('http:', 'https:'); + } + // https locator url + if(configOptions.locatorserviceurl && location.protocol === "https:") { + configOptions.locatorserviceurl = configOptions.locatorserviceurl.replace('http:', 'https:'); + } + // https sharing url + if(configOptions.sharingurl && location.protocol === "https:") { + configOptions.sharingurl = configOptions.sharingurl.replace('http:', 'https:'); + } + // https portal url + if(configOptions.portalUrl && location.protocol === "https:") { + configOptions.portalUrl = configOptions.portalUrl.replace('http:', 'https:'); + } + // set sharing URL + if(!configOptions.sharingurl){ + configOptions.sharingurl = location.protocol + '//' + location.host + "/sharing/rest/content/items"; + } + // set portal URL + if(!configOptions.portalUrl){ + configOptions.portalUrl = location.protocol + '//' + location.host + "/"; + } + // set portal URL + if(!configOptions.mobilePortalUrl){ + configOptions.mobilePortalUrl = 'arcgis://' + location.host + "/"; + } + // Set Proxy URL + if(!configOptions.proxyUrl){ + configOptions.proxyUrl = location.protocol + '//' + location.host + "/sharing/proxy"; + } + // lowercase layout + if(configOptions.defaultLayout){ + configOptions.defaultLayout = configOptions.defaultLayout.toLowerCase(); + } + // if no theme is set at all + if(!configOptions.theme){ + configOptions.theme = "blueTheme"; + } + // if no point symbol set + if(!configOptions.hasOwnProperty('pointGraphic')){ + configOptions.pointGraphic = "images/ui/bluepoint-21x25.png"; + } + // if no gallery per page set + if(!configOptions.hasOwnProperty('galleryItemsPerPage')){ + configOptions.galleryItemsPerPage = 9; + } + // if no gallery per page set + if(!configOptions.hasOwnProperty('mapViewer')){ + configOptions.mapViewer = 'simple'; + } + // if no sort order set + if(!configOptions.hasOwnProperty('sortOrder')){ + configOptions.sortOrder = 'desc'; + } + // if no sort field set + if(!configOptions.hasOwnProperty('sortField')){ + configOptions.sortField = 'modified'; + } + // if no default layout + if(!configOptions.hasOwnProperty('defaultLayout')){ + configOptions.defaultLayout = 'grid'; + } + // set defaults + esri.arcgis.utils.arcgisUrl = configOptions.sharingurl; + esri.config.defaults.geometryService = new esri.tasks.GeometryService(configOptions.geometryserviceurl); + esri.config.defaults.io.proxyUrl = configOptions.proxyUrl; + esri.config.defaults.io.corsEnabledServers = [location.protocol + '//' + location.host]; + esri.config.defaults.io.alwaysUseProxy = false; +} +/*------------------------------------*/ +// query group +/*------------------------------------*/ +function queryGroup(callback){ + // query group info + queryArcGISGroupInfo({ + // Settings + id_group: configOptions.group, + // Executed after ajax returned + callback: function(obj,data){ + if(data.results.length > 0){ + // set group content + setGroupContent(data.results[0]); + // if callback + if(callback && typeof callback === 'function'){ + // call callback function + callback.call(this); + } + } + else{ + // show error dialog + var dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.noGroupResults + }); + dialog.show(); + } + } + }); +} +/*------------------------------------*/ +// Set group information to template +/*------------------------------------*/ +function setGroupContent(groupInfo){ + // set group id + if(!configOptions.group){ + configOptions.group = groupInfo.id; + } + // Set owner + if(!configOptions.groupOwner){ + configOptions.groupOwner = groupInfo.owner; + } + // Set group title + if(!configOptions.groupTitle){ + configOptions.groupTitle = groupInfo.title; + } + // Set home heading + if(!configOptions.homeHeading){ + configOptions.homeHeading = groupInfo.title; + } + // Set home snippet + if(!configOptions.homeSnippet){ + configOptions.homeSnippet = groupInfo.snippet; + } + // Set home side content + if(!configOptions.homeSideContent){ + configOptions.homeSideContent = groupInfo.description; + } + // set footer image + if(!configOptions.footerLogo){ + configOptions.footerLogo = groupInfo.thumbnailUrl; + } + // set footer image link + if(!configOptions.footerLogoUrl){ + configOptions.footerLogoUrl = getViewerURL('group_page'); + } + // set page title + document.title = configOptions.siteTitle + ' - ' + groupInfo.title; + // insert all the group content + insertContent(); +} +/*------------------------------------*/ +// Set false url param strings to false +/*------------------------------------*/ +function setFalseValues(obj){ + // for each key + for(var key in obj){ + // if not a prototype + if(obj.hasOwnProperty(key)){ + // if is a false value string + if(typeof obj[key] === 'string' && (obj[key].toLowerCase() === 'false' || obj[key].toLowerCase() === 'null' || obj[key].toLowerCase() === 'undefined')){ + // set to false bool type + obj[key] = false; + } + } + } + // return object + return obj; +} +/*------------------------------------*/ +// Set URL params such as group, theme, webmap and more +/*------------------------------------*/ +function configUrlParams(){ + // set url object + urlObject = esri.urlToObject(document.location.href); + //urlObject = esri.urlToObject(tmpURL); + // make sure it's an object + urlObject.query = urlObject.query || {}; + // check for false value strings + urlObject.query = setFalseValues(urlObject.query); + // mix in settings + dojo.mixin(configOptions, urlObject.query); +} +/*------------------------------------*/ +// is user on supported mobile device +/*------------------------------------*/ +function isMobileUser(){ + // if ios or android + if(configOptions.agent_ios || configOptions.agent_android){ + return true; + } + else{ + return false; + } +} +/*------------------------------------*/ +// ZOOM TO LOCATION: ZOOMS MAP TO LOCATION POINT +/*------------------------------------*/ +function zoomToLocation(x, y, IPAccuracy){ + // calculate lod + var lod = 16; + // set point + var pt = esri.geometry.geographicToWebMercator(new esri.geometry.Point(x, y)); + // if point graphic set + if(configOptions.pointGraphic){ + // If locate layer + if(locateResultLayer) { + // clear layer + locateResultLayer.clear(); + } + else{ + // Create layer for result + locateResultLayer = new esri.layers.GraphicsLayer(); + // Add layer to map + map.addLayer(locateResultLayer); + } + // Create point symbol + var pointSymbol = new esri.symbol.PictureMarkerSymbol(configOptions.pointGraphic, 21, 25).setOffset(0,12); + // Set graphic + var locationGraphic = new esri.Graphic(pt,pointSymbol); + // Add graphic to layer + locateResultLayer.add(locationGraphic); + } + // zoom and center + map.centerAndZoom(pt,lod); +} +/*------------------------------------*/ +// GEOLOCATE FUNCTION: SETS MAP LOCATION TO USERS LOCATION +/*------------------------------------*/ +function geoLocateMap(position){ + // Get lattitude + var latitude = position.coords.latitude; + // Get longitude + var longitude = position.coords.longitude; + // Get accuracy + var IPAccuracy = position.coords.accuracy; + // Zoom to location + zoomToLocation(longitude, latitude, IPAccuracy); +} +/*------------------------------------*/ +// Set user agent +/*------------------------------------*/ +function setUserAgent(){ + // set agent + configOptions.agent = navigator.userAgent.toLowerCase(); + // if iOS + configOptions.agent_ios = configOptions.agent.match(/(iphone|ipod|ipad)/); + // if Android + configOptions.agent_android = configOptions.agent.match(/(android)/); +} +/*------------------------------------*/ +// Insert social media html +/*------------------------------------*/ +function insertSocialHTML(){ + var html = ''; + if(configOptions.showSocialButtons){ + html += '<div class="addthis_toolbox addthis_default_style">'; + html += '<a class="addthis_button_facebook"></a>'; + html += '<a class="addthis_button_twitter"></a>'; + html += '<a class="addthis_button_linkedin"></a>'; + html += '<a class="addthis_button_email"></a>'; + html += '<a class="addthis_button_compact"></a>'; + html += '<a class="addthis_counter addthis_bubble_style"></a>'; + html += '</div>'; + // addthis url + var addthisURL = "http://s7.addthis.com/js/250/addthis_widget.js#pubid="; + // https support + if(addthisURL && location.protocol === "https:"){ + addthisURL = addthisURL.replace('http:', 'https:'); + } + // load share script + dojo.io.script.get({ + url: addthisURL + configOptions.addThisProfileId + }); + } + else{ + html += ' '; + } + // if social HTML + var node = dojo.byId('socialHTML'); + setNodeHTML(node, html); +} +/*------------------------------------*/ +// Insert footer HTML +/*------------------------------------*/ +function insertFooterHTML(){ + var html = ''; + html += '<div id="footerCon">'; + html += '<div class="container_12">'; + html += '<div class="grid_6">'; + html += '<div class="Pad">'; + // Set footer heading + if(configOptions.footerHeading){ + html += '<h2 id="footerHeading">'; + html += configOptions.footerHeading; + html += '</h2>'; + } + // if footer description + if(configOptions.footerDescription){ + html += '<div id="footerDescription">'; + html += configOptions.footerDescription; + html += '</div>'; + } + // if neither is set just put a space. + if(!configOptions.footerHeading && !configOptions.footerDescription){ + html += ' '; + } + html += '</div>'; + html += '</div>'; + html += '<div class="prefix_3 grid_3">'; + html += '<div id="footerLogoDiv" class="logoDiv footBorder">'; + // Set footer logo + if(configOptions.footerLogo && configOptions.showFooter){ + html += '<div>'; + // if logo url + if(configOptions.footerLogoUrl){ + html += '<a id="yourLogo" href="' + configOptions.footerLogoUrl + '" title="' + configOptions.homeHeading + '">'; + } + html += '<img src="' + configOptions.footerLogo + '" alt="' + configOptions.homeHeading + '" title="' + configOptions.homeHeading + '" />'; + // if logo url + if(configOptions.footerLogoUrl){ + html += '</a>'; + } + html += '</div>'; + } + html += '</div>'; + html += '</div>'; + html += '<div class="clear"></div>'; + html += '</div>'; + html += '</div>'; + // if Footer + var node = dojo.byId('footer'); + setNodeHTML(node, html); + // set Background Color + dojo.query("body").style('background-color', '#4d4d4d'); +} +/*------------------------------------*/ +// Insert Navigation/Banner +/*------------------------------------*/ +function insertHeaderContent(){ + var html = ''; + var node = dojo.byId('templateNav'); + html += '<li id="homeItem"><a tabindex="0" title="' + configOptions.siteTitle + '" href="' + getViewerURL('index_page') + '" id="siteTitle">'; + // if banner image + if(configOptions.siteBannerImage){ + html += '<img alt="' + configOptions.siteTitle + '" title="' + configOptions.siteTitle + '" src="' + configOptions.siteBannerImage + '" />'; + } + else{ + html += configOptions.siteTitle; + } + html += '</a></li>'; + // copy if any current lists are in there that users may have set + if(node){ + html += node.innerHTML; + } + // if show about page + if(configOptions.showAboutPage){ + html += '<li><a tabindex="0" href="' + getViewerURL('about_page') + '">' + i18n.viewer.sidePanel.aboutButton + '</a></li>'; + } + // insert HTML + setNodeHTML(node, html); + // set selected class + dojo.forEach(dojo.query('#templateNav li a'),function(obj){ + // if link HREF equals page HREF + if(obj.href === location.href){ + // add selected class + dojo.query(obj).addClass('activeLink'); + } + }); +} +/*------------------------------------*/ +// Insert HTML to node reference function +/*------------------------------------*/ +function setNodeHTML(node, htmlString){ + if(node){ + // update HTML + node.innerHTML = htmlString; + // resize sidebar and scrolling div + resizeSidebarHeight(); + } +} +/*------------------------------------*/ +// Resize Sidebar and scrolling div +/*------------------------------------*/ +function resizeSidebarHeight(){ + // vars + var scrollHeight = 0, mainHeight = 0, outerHeight = 0, outerNode = dojo.query('#sidePanel .outerHeight'), scrollNode = dojo.query('#sidePanel .scrollHeight'), sideNode = dojo.byId('sidePanel'), mainNode = dojo.byId('mainPanel'); + // outer nodes in scroll area + if(outerNode){ + // for each outer node + for(var i = 0; i < outerNode.length; i++){ + // increase outer node height + outerHeight = outerHeight + dojo.marginBox(outerNode[i]).h; + } + } + // if main node and side node + if(mainNode && sideNode){ + // get inner height of main node + mainHeight = dojo.contentBox(mainNode).h; + // if inner height is less than 750. make that the default. + if(mainHeight < 750){ + mainHeight = 750; + } + // set scrolling height + scrollHeight = mainHeight - outerHeight; + // set height of side bar + dojo.style(sideNode, 'height', mainHeight + 'px'); + } + // if scroll height is set and scroll nodes are there + if(scrollHeight && scrollNode){ + // for each scrolling node + for(var j = 0; j < scrollNode.length; j++){ + // set it's height + dojo.style(scrollNode[j], 'height', scrollHeight + 'px'); + } + } +} +/*------------------------------------*/ +// Insert content +/*------------------------------------*/ +function insertContent(){ + // add direction tag to HTML + var dirNode = dojo.query("html"); + // if RTL + if(configOptions.isRightToLeft) { + // Set direction class + dirNode.addClass('esriRtl'); + // direction attribute + dirNode.attr('dir', 'rtl'); + } + else { + // Set direction class + dirNode.addClass('esriLtr'); + // direction attribute + dirNode.attr('dir', 'ltr'); + } + // add sidepanel class + dojo.query('#sidePanel').addClass('dataLayers'); + // add main panel class + dojo.query('#mainPanel').addClass('contentLeft'); + // Set Theme + dirNode.addClass(configOptions.theme); + // Insert banner and navigation + insertHeaderContent(); + // Set social media buttons + insertSocialHTML(); + // Set footer + if(configOptions.showFooter){ + insertFooterHTML(); + } +} +/*------------------------------------*/ +// query arcgis group info +/*------------------------------------*/ +function queryArcGISGroupInfo(obj){ + // default values + var settings = { + // set group id for web maps + id_group : '', + // format + dataType : 'json', + // callback function with object + callback: null + }; + // If options exist, lets merge them with our default settings + if(obj) { + dojo.mixin(settings, obj); + } + // first, request the group to see if it's public or private + esri.request({ + // group rest URL + url: configOptions.portalUrl + '/sharing/rest/community/groups/' + settings.id_group, + content: { + 'f':settings.dataType + }, + callbackParamName: 'callback', + load: function (response) { + // sign-in flag + var signInRequired = (response.access !== 'public') ? true : false; + // if sign-in is required + if(signInRequired){ + portal.signIn(); + } + // query + var q = 'id:"' + settings.id_group + '"'; + var params = { + q: q, + v: configOptions.arcgisRestVersion, + f: settings.dataType + }; + portal.queryGroups(params).then(function(data){ + if(typeof settings.callback === 'function'){ + // call callback function with settings and data + settings.callback.call(this, settings, data); + } + }); + } + }); +} +/*------------------------------------*/ +// Create portal and proceed +/*------------------------------------*/ +function createPortal(callback){ + // create portal + portal = new esri.arcgis.Portal(configOptions.portalUrl); + // portal loaded + dojo.connect(portal, 'onLoad', function(){ + if(typeof callback === 'function'){ + // call callback function + callback.call(this); + } + }); +} +/*------------------------------------*/ +// Query arcgis items +/*------------------------------------*/ +function queryArcGISGroupItems(obj){ + // default values + var settings = { + // set group id for web maps + id_group: '', + // type of item + searchType: '', + // filter these items + filterType: '', + // access type + searchAccess: '', + // format + dataType: 'json', + // sorting column: The allowed field names are title, modified, type, owner, avgRating, numRatings, numComments and numViews. + sortField: 'modified', + // sorting order: Values: asc | desc + sortOrder: 'desc', + // if pagination + pagination: true, + // how many links to show on each side of pagination + paginationSize: 1, + // show first and last links on pagination + paginationShowFirstLast: true, + // show previous and next links + paginationShowPrevNext: true, + // search limit + perPage: '', + // maps per row + perRow: '', + // offset + searchStart: 1, + // search keywords + keywords: '', + // style of layout for the results + layout: 'grid', + // callback function with object + callback: null + }; + // If options exist, lets merge them with our default settings + if(obj) { + dojo.mixin(settings, obj); + } + var q = ''; + q += 'group:"' + settings.id_group + '"'; + if(settings.keywords){ + q += ' AND ('; + q += ' title:"' + settings.keywords + '"'; + q += ' OR tags:"' + settings.keywords + '"'; + q += ' OR typeKeywords:"' + settings.keywords + '"'; + q += ' OR snippet:"' + settings.keywords + '"'; + q += ' ) '; + } + if(settings.searchType){ + q += ' AND type:"' + settings.searchType + '"'; + } + if(settings.searchType && settings.filterType){ + q += ' -type:"' + settings.filterType + '"'; + } + if(settings.searchAccess){ + q += ' AND access:"' + settings.searchAccess + '"'; + } + var params = { + q: q, + v: configOptions.arcgisRestVersion, + f: settings.dataType + }; + if(settings.sortField){ + params.sortField = settings.sortField; + } + if(settings.sortOrder){ + params.sortOrder = settings.sortOrder; + } + if(settings.perPage){ + params.num = settings.perPage; + } + else{ + params.num = 0; + } + if(settings.searchStart > 1){ + params.start = (((settings.searchStart - 1) * settings.perPage) + 1); + } + portal.queryItems(params).then(function(data){ + if(typeof settings.callback === 'function'){ + // call callback function with settings and data + settings.callback.call(this, settings, data); + } + }); +} +/*------------------------------------*/ +// create pagination function +/*------------------------------------*/ +function createPagination(obj, totalItems, pagObject){ + // creates middle pagination item HTML + function createMiddleItem(i, current){ + // class + var selectedClass = 'enabled'; + if(i === current){ + // if selected + selectedClass = 'selected'; + } + // page list item + return '<li tabindex="0" title="' + i18n.viewer.pagination.page + ' ' + dojo.number.format(i) + '" data-offset="' + i + '" class="default ' + selectedClass + '">' + dojo.number.format(i) + '</li>'; + } + // variables + var html = '', startHTML = '', middleHTML = '', endHTML = '', current, first, previous, next, last, middleCount = 0, lastMiddle = 0, firstMiddle = 0, remainderStart, helipText = i18n.viewer.pagination.helip, paginationCount, npCount = 0; + // if pagination is necessary + if(obj.pagination && obj.perPage && totalItems > obj.perPage){ + // create pagination list + html += '<ul>'; + // determine offset links + current = parseInt(obj.searchStart, 10); + // first link + first = 1; + // previous link + previous = current - 1; + // next link + next = current + 1; + // last link + last = Math.ceil(totalItems/obj.perPage); + // determine next and previous count + if(obj.paginationShowPrevNext){ + npCount = 2; + } + // determine pagination total size + paginationCount = 1 + npCount + (2 * obj.paginationSize); + // if pages matches size of pagination + if(last === paginationCount){ + helipText = ''; + } + // pagination previous + if(obj.paginationShowPrevNext){ + var firstClass = 'disabled', firstOffset = ''; + if(current > 1){ + firstClass = 'enabled'; + firstOffset = 'data-offset="' + previous + '"'; + } + startHTML += '<li tabindex="0" title="' + i18n.viewer.pagination.previous + '" class="silverButton buttonLeft previous ' + firstClass + '" ' + firstOffset + '><span> </span></li>'; + } + // pagination first page + if(obj.paginationShowFirstLast && current > (obj.paginationSize + 1)){ + startHTML += '<li tabindex="0" class="default enabled" title="' + i18n.viewer.pagination.first + '" data-offset="' + first + '">' + dojo.number.format(first) + helipText + '</li>'; + } + else{ + middleCount = middleCount - 1; + } + // pagination last page + if(obj.paginationShowFirstLast && current < (last - obj.paginationSize)){ + endHTML += '<li tabindex="0" class="default enabled" title="' + i18n.viewer.pagination.last + '" data-offset="' + last + '">' + helipText + dojo.number.format(last) + '</li>'; + } + else{ + middleCount = middleCount - 1; + } + // pagination next + if(obj.paginationShowPrevNext){ + var lastClass = 'disabled', lastOffset = ''; + if(current < last){ + lastClass = 'enabled'; + lastOffset = 'data-offset="' + next + '"'; + } + endHTML += '<li tabindex="0" title="' + i18n.viewer.pagination.next + '" class="silverButton buttonRight next ' + lastClass + '" ' + lastOffset + '><span> </span></li>'; + } + // create each pagination item + for(var i = 1; i <= last; i++) { + if(i <= (current + obj.paginationSize) && i >= (current - obj.paginationSize)){ + if(firstMiddle === 0){ + firstMiddle = i; + } + middleHTML += createMiddleItem(i, current); + middleCount++; + lastMiddle = i; + } + } + // if last middle is last page + if(lastMiddle === last){ + // get remainderStart start + remainderStart = firstMiddle - 1; + // while not enough remainders + while(middleCount < (obj.paginationSize * 2) + 1){ + // if remainder start is less or equal to first page + if(remainderStart <= first){ + // end while + break; + } + // add item to beginning of middle html + middleHTML = createMiddleItem(remainderStart, current) + middleHTML; + // increase middle count + middleCount++; + // decrease remainder start + remainderStart--; + } + } + // if first middle is first page + else if(firstMiddle === first){ + // get remainderStart start + remainderStart = lastMiddle + 1; + // while not enough remainders + while(middleCount < (obj.paginationSize * 2) + 1){ + // if remainder start is greater or equal to last page + if(remainderStart >= last){ + // end while + break; + } + // add item to end of middle html + middleHTML += createMiddleItem(remainderStart, current); + // increase middle count + middleCount++; + // increase remainder start + remainderStart++; + } + } + // add up HTML + html += startHTML + middleHTML + endHTML; + // Pagination Spinner Container + html += '<li id="paginationSpinner" class="spinnerCon"></li>'; + // end pagination + html += '</ul>'; + } + else{ + html += ' '; + } + html += '<div class="clear"></div>'; + // insert into html + var node = dojo.byId(pagObject); + // insert pagination html + setNodeHTML(node, html); +} +/*------------------------------------*/ +// Configure viewer URL to use +/*------------------------------------*/ +function getViewerURL(viewer, webmap, owner){ + // if not defined + if(!viewer){ + // set to default in config + viewer = configOptions.mapViewer; + } + // lowercase viewer string + viewer = viewer.toLowerCase(); + // return url and vars + var retUrl = '', queryString = '', firstParamFlag; + // if webmap is set + if(webmap){ + // set webmap in query object + urlObject.query.webmap = webmap; + } + else{ + // if webmap set + if(urlObject.query.webmap){ + // unset it + delete urlObject.query.webmap; + } + } + // for each query param + for(var key in urlObject.query){ + // if url has property + if(urlObject.query.hasOwnProperty(key)){ + // if flag not set + if(!firstParamFlag){ + // prepend ? + queryString += '?'; + // flag for first query param + firstParamFlag = 1; + } + else{ + // prepend & + queryString += '&'; + } + // append to query string + queryString += key + '=' + encodeURIComponent(urlObject.query[key]); + } + } + // return correct url + switch(viewer){ + // home page link + case 'index_page': + retUrl = 'index.html' + queryString; + return retUrl; + // about page link + case 'about_page': + retUrl = 'about.html' + queryString; + return retUrl; + // portal viewer link + case 'arcgis': + return configOptions.portalUrl + 'home/webmap/viewer.html?webmap=' + webmap; + // arcgis explorer link + case 'explorer': + retUrl = "http://explorer.arcgis.com/?open=" + webmap; + if(retUrl && location.protocol === "https:") { + retUrl = retUrl.replace('http:', 'https:'); + } + return retUrl; + // arcgis explorer presentation mode link + case 'explorer_present': + retUrl = "http://explorer.arcgis.com/?present=" + webmap; + if(retUrl && location.protocol === "https:") { + retUrl = retUrl.replace('http:', 'https:'); + } + return retUrl; + // portal owner page link + case 'owner_page': + if(configOptions.groupOwner || owner){ + if(owner){ + retUrl = configOptions.portalUrl + 'home/user.html?user=' + encodeURIComponent(owner); + } + else{ + retUrl = configOptions.portalUrl + 'home/user.html?user=' + encodeURIComponent(configOptions.groupOwner); + } + } + return retUrl; + // portal item page + case 'item_page': + if(configOptions.webmap){ + retUrl = configOptions.portalUrl + 'home/item.html?id=' + configOptions.webmap; + } + return retUrl; + // portal group page + case 'group_page': + if(configOptions.groupOwner && configOptions.groupTitle){ + retUrl = configOptions.portalUrl + 'home/group.html?owner=' + encodeURIComponent(configOptions.groupOwner) + '&title=' + encodeURIComponent(configOptions.groupTitle); + } + return retUrl; + // portal mobile URL data + case 'mobile': + if(configOptions.agent_ios){ + retUrl = configOptions.mobilePortalUrl + 'sharing/rest/content/items/' + webmap + '/data'; + } + else if(configOptions.agent_android){ + retUrl = configOptions.mobilePortalUrl + '?webmap=' + webmap; + } + return retUrl; + case 'mobile_app': + // if iOS Device + if(configOptions.agent_ios && configOptions.iosAppUrl){ + retUrl = configOptions.iosAppUrl; + } + // if Android Device + else if(configOptions.agent_android && configOptions.androidAppUrl){ + retUrl = configOptions.androidAppUrl; + } + return retUrl; + // simple viewer + case 'simple': + retUrl = 'map.html' + queryString; + return retUrl; + + case 'drupal': + retUrl = '/drupal78/arcgis/map/' + webmap; + return retUrl; + + default: + return ''; + } +}
\ No newline at end of file diff --git a/javascript/djConfig.js b/javascript/djConfig.js new file mode 100644 index 0000000..108d1c6 --- /dev/null +++ b/javascript/djConfig.js @@ -0,0 +1,22 @@ +// host path regular expression +var pathRegex = new RegExp(/\/[^\/]+$/); +var locationPath = location.pathname.replace(pathRegex, ''); + +// Dojo Config +var dojoConfig = { + parseOnLoad: true, + packages: [{ + name: "esriTemplate", + location: 'http://martenh:82/drupal78/sites/all/modules/esri_mapgallery' // locationPath + //location: 'abc' + }, { + name: "myModules", + location: locationPath + '/javascript' + }, { + name: "apl", + location: locationPath + '/apl' + }] +}; + +// Global Variables +var i18n, searchVal = '', dataOffset, prevVal = "", ACObj, ACTimeout, timer, urlObject, portal, map, locateResultLayer, aoGeocoder, aoGeoCoderAutocomplete, mapFullscreen, resizeTimer, mapCenter;
\ No newline at end of file diff --git a/javascript/home/layout.js b/javascript/home/layout.js new file mode 100644 index 0000000..23ae7df --- /dev/null +++ b/javascript/home/layout.js @@ -0,0 +1,504 @@ +// Dojo Requires +dojo.require("esri.arcgis.utils"); +dojo.require("esri.IdentityManager"); +dojo.require("esri.arcgis.Portal"); +dojo.require("dojo.NodeList-manipulate"); +dojo.require("dojo.NodeList-traverse"); +dojo.require("dojox.NodeList.delegate"); +dojo.require("dijit.Dialog"); +dojo.require("dojo.io.script"); +dojo.require("dojo.number"); +/*------------------------------------*/ +// on dojo load +/*------------------------------------*/ +dojo.addOnLoad(function(){ + // set default configuration options + setDefaultConfigOptions(); + // set app ID settings and call init after + setAppIdSettings(function(){ + // create portal + createPortal(function(){ + init(); + }); + }); +}); +/*------------------------------------*/ +// QUERY FEATURED MAPS +/*------------------------------------*/ +function queryMaps(data_offset,keywords){ + // If no offest, set to 1 + if(!data_offset) { + data_offset = 1; + } + // If no keywords + if(!keywords) { + keywords = ''; + } + // Call featured maps + queryArcGISGroupItems({ + // Settings + id_group : configOptions.group, + searchType : configOptions.searchType, + sortField : configOptions.sortField, + sortOrder : configOptions.sortOrder, + pagination: configOptions.showPagination, + paginationShowFirstLast: true, + paginationShowPrevNext: true, + keywords: keywords, + perPage : parseInt(configOptions.galleryItemsPerPage, 10), + perRow : parseInt(configOptions.galleryPerRow, 10), + layout: configOptions.defaultLayout, + searchStart : data_offset, + // Executed after ajax is returned + callback: function(obj,data){ + // Build featured items + buildMapPlaylist(obj,data); + } + }); +} +/*------------------------------------*/ +// Insert Home Content +/*------------------------------------*/ +function insertHomeContent(){ + // Set home heading + if(configOptions.homeHeading){ + node = dojo.byId('homeHeading'); + setNodeHTML(node, configOptions.homeHeading); + } + // Set home intro text + if(configOptions.homeSnippet){ + node = dojo.byId('homeSnippet'); + setNodeHTML(node, configOptions.homeSnippet); + } + // Set home right heading + if(configOptions.homeSideHeading){ + node = dojo.byId('homeSideHeading'); + setNodeHTML(node, configOptions.homeSideHeading); + } + // Set home right content + if(configOptions.homeSideContent){ + node = dojo.byId('homeSideContent'); + setNodeHTML(node, configOptions.homeSideContent); + } +} +/*------------------------------------*/ +// Group auto-complete search +/*------------------------------------*/ +function groupAutoComplete(acQuery){ + // Called when searching (Autocomplete) + queryArcGISGroupItems({ + // Settings + id_group : configOptions.group, + searchType : configOptions.searchType, + sortField : configOptions.sortField, // SORTING COLUMN: The allowed field names are title, modified, type, owner, avgRating, numRatings, numComments and numViews. + sortOrder : configOptions.sortOrder, // SORTING ORDER: Values: asc | desc + keywords: acQuery, + perPage : 10, + searchStart : 1, + // Executed after ajax is returned + callback: function(obj,data){ + // Show auto-complete + showGroupAutoComplete(obj,data); + } + }); +} +/*------------------------------------*/ +// Hide auto-complete +/*------------------------------------*/ +function hideGroupAutoComplete(){ + dojo.query("#searchListUL").removeClass('autoCompleteOpen'); + dojo.query("#groupAutoComplete").style('display','none'); +} +/*------------------------------------*/ +// Show auto-complete +/*------------------------------------*/ +function showGroupAutoComplete(obj, data){ + var aResults = ''; + var node; + var partialMatch = dojo.query("#searchGroup").attr('value')[0]; + var regex = new RegExp('(' + partialMatch + ')','gi'); + if(data.results !== null){ + dojo.query(".searchList").addClass('autoCompleteOpen'); + ACObj = data.results; + aResults += '<ul class="zebraStripes">'; + for(var i = 0; i < data.results.length; i++){ + var layerClass = ''; + if(i % 2 === 0){ + layerClass = ''; + } + else{ + layerClass = 'stripe'; + } + aResults += '<li tabindex="0" class="' + layerClass + '">' + data.results[i].title.replace(regex,'<span>' + partialMatch + '</span>') + '</li>'; + } + aResults += '</ul>'; + node = dojo.byId('groupAutoComplete'); + if(node){ + if(data.results.length > 0){ + setNodeHTML(node, aResults); + } + else{ + setNodeHTML(node, '<p>' + i18n.viewer.errors.noMatches + '</p>'); + clearTimeout(ACTimeout); + ACTimeout = setTimeout(function(){ + hideGroupAutoComplete(); + },3000); + } + dojo.style(node, 'display', 'block'); + } + } +} +/*------------------------------------*/ +// Build Map Playlist +/*------------------------------------*/ +function buildMapPlaylist(obj,data){ + // hide auto complete + hideGroupAutoComplete(); + // Remove Spinner + removeSpinner(); + // Clear Pagination + var node = dojo.byId('maps_pagination'); + setNodeHTML(node, ''); + // HTML Variable + var html = ''; + // Get total results + var totalItems = data.total; + var totalResults = data.results.length; + var layout; + // If we have items + if(totalItems > 0){ + layout = 'mapsGrid'; + if(obj.layout === 'list'){ + layout = 'mapsList'; + } + // If perpage is more than total + var fortotal; + if(obj.pagination && obj.perPage && obj.perPage < totalResults){ + // Use per page + forTotal = obj.perPage; + } + else{ + // Use total + forTotal = totalResults; + } + // Create list items + for(var i = 0; i < forTotal; i++) { + // variables + var appClass = ''; + var itemTitle; + var itemURL; + var snippet; + var linkTarget; + var externalLink = false; + // If item has URL + if(data.results[i].url){ + itemURL = data.results[i].url; + appClass = ' externalLink'; + externalLink = true; + } + else{ + // url variable + itemURL = getViewerURL(configOptions.mapViewer, data.results[i].id); + } + if(obj.layout === 'list'){ + itemTitle = data.results[i].title; + snippet = ''; + if(data.results[i].snippet){ + snippet = data.results[i].snippet; + } + linkTarget = ''; + if(configOptions.openGalleryItemsNewWindow || externalLink){ + linkTarget = 'target="_blank"'; + } + // Build list item + html += '<div class="grid_9 sigma">'; + html += '<div class="item' + appClass + '">'; + html += '<a ' + linkTarget + ' class="block" id="mapItem' + i + '" title="' + itemTitle + '" href="' + itemURL + '">'; + if(externalLink){ + html += '<span class="externalIcon"></span>'; + } + html += '<img alt="' + itemTitle + '" src="' + data.results[i].thumbnailUrl + '" width="200" height="133" />'; + html += '</a>'; + html += '<div class="itemInfo">'; + html += '<strong><a ' + linkTarget + ' class="title" id="mapItemLink' + i + '" title="' + snippet + '" href="' + itemURL + '">' + itemTitle + '</a></strong>'; + html += '<p>' + snippet + '</p>'; + html += '</div>'; + html += '<div class="clear"></div>'; + html += '</div>'; + html += '</div>'; + html += '<div class="clear"></div>'; + } + else{ + var endRow = false, frontRow = false; + var itemClass = ''; + itemTitle = data.results[i].title; + snippet = ''; + if(data.results[i].snippet){ + snippet = data.results[i].snippet; + } + linkTarget = ''; + if(configOptions.openGalleryItemsNewWindow || externalLink){ + linkTarget = 'target="_blank"'; + } + // Last row item + if((i + 1) % obj.perRow === 0){ + itemClass = ' omega'; + endRow = true; + } + // First row item + if((i + 3) % obj.perRow === 0){ + itemClass = ' alpha'; + frontRow = true; + } + // Build grid item + html += '<div class="grid_3' + itemClass + '">'; + html += '<a class="item' + appClass + '" ' + linkTarget + ' id="mapItem' + i + '" title="' + snippet + '" href="' + itemURL + '">'; + if(externalLink){ + html += '<span class="externalIcon"></span>'; + } + html += '<img alt="' + itemTitle + '" class="gridImg" src="' + data.results[i].thumbnailUrl + '" width="200" height="133" />'; + html += '<span class="itemTitle">' + itemTitle + '</span>'; + html += '</a>'; + html += '</div>'; + if(endRow){ + html += '<div class="clear"></div>'; + } + } + } + // Close + html += '<div class="clear"></div>'; + } + else{ + // No results + html += '<div class="grid_5 suffix_4 sigma"><p class="alert error">' + i18n.viewer.errors.noMapsFound + ' <a tabindex="0" id="resetGroupSearch">' + i18n.viewer.groupPage.showAllMaps + '</a></p></div>'; + html += '<div class="clear"></div>'; + } + // Insert HTML + node = dojo.byId('featuredMaps'); + if(node){ + dojo.query(node).removeClass('mapsGrid mapsList').addClass(layout); + setNodeHTML(node, html); + } + // Create pagination + createPagination(obj,totalItems,'maps_pagination'); +} +/*------------------------------------*/ +// Enalbe layout and search options +/*------------------------------------*/ +function configLayoutSearch(){ + // if show search or show layout switch + if(configOptions.showGroupSearch || configOptions.showLayoutSwitch){ + // create HTML + var html = '', listClass, gridClass; + // if show search + html += '<div id="searchListCon" class="grid_5 alpha">'; + if(configOptions.showGroupSearch){ + html += '<ul id="searchListUL" class="searchList">'; + html += '<li id="mapSearch" class="iconInput">'; + html += '<input placeholder="' + i18n.viewer.groupPage.searchPlaceholder + '" id="searchGroup" title="' + i18n.viewer.groupPage.searchTitle + '" value="" autocomplete="off" type="text" tabindex="0" />'; + html += '<div tabindex="0" title="' + i18n.viewer.main.clearSearch + '" class="iconReset" id="clearAddress"></div>'; + html += '</li>'; + html += '<li title="' + i18n.viewer.groupPage.searchTitleShort + '" class="searchButtonLi">'; + html += '<span tabindex="0" id="searchGroupButton" class="silverButton buttonRight">'; + html += '<span class="searchButton"> </span></span>'; + html += '</li>'; + html += '<li id="groupSpinner" class="spinnerCon"></li>'; + html += '</ul>'; + html += '<div class="clear"></div>'; + html += '<div id="acCon"><div id="groupAutoComplete" class="autoComplete"></div></div><div class="clear"></div>'; + } + else{ + html += ' '; + } + html += '</div>'; + // if show switch + html += '<div class="grid_4 omega">'; + if(configOptions.showLayoutSwitch){ + if(configOptions.defaultLayout === "list"){ + listClass = 'active'; + gridClass = ''; + } + else{ + listClass = ''; + gridClass = 'active'; + } + html += '<div class="toggleLayout">'; + html += '<ul>'; + html += '<li id="layoutList" class="' + listClass + '" title="' + i18n.viewer.groupPage.listSwitch + '">'; + html += '<span tabindex="0" class="silverButton buttonRight"><span class="listView"> </span></span>'; + html += '<li id="layoutGrid" class="' + gridClass + '" title="' + i18n.viewer.groupPage.gridSwitch + '">'; + html += '<span tabindex="0" class="silverButton buttonLeft"><span class="gridView"> </span></span>'; + html += '</li>'; + html += '<li id="layoutSpinner" class="spinnerCon"></li>'; + html += '</li>'; + html += '</ul>'; + html += '<div class="clear"></div>'; + html += '</div>'; + html += '<div class="clear"></div>'; + } + else{ + html += ' '; + } + html += '</div>'; + html += '<div class="clear"></div>'; + // if node, insert HTML + var node = dojo.byId('layoutAndSearch'); + setNodeHTML(node, html); + } +} +/*------------------------------------*/ +// Event Delegations +/*------------------------------------*/ +function setDelegations(){ + // Featured maps pagination onclick function + dojo.query('#maps_pagination').delegate("ul .enabled", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + // clicked + dojo.query(this).addClass('clicked'); + var placeDom = dojo.query("#maps_pagination ul"); + // add loading spinner + addSpinner("paginationSpinner"); + // get offset number + var data_offset = dojo.query(this).attr('data-offset')[0]; + dataOffset = data_offset; + // query maps function + queryMaps(data_offset,searchVal); + } + }); + // search button + dojo.query(document).delegate("#searchGroupButton", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + var textVal = dojo.query("#searchGroup").attr('value')[0]; + if(textVal !== prevVal){ + searchVal = textVal; + addSpinner("groupSpinner"); + queryMaps(1,textVal); + prevVal = searchVal; + } + } + }); + // search reset button + dojo.query(document).delegate("#clearAddress, #resetGroupSearch", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + dojo.query('#clearAddress').removeClass('resetActive'); + dojo.query("#searchGroup").attr('value', ''); + searchVal = ''; + addSpinner("groupSpinner"); + queryMaps(1,''); + prevVal = searchVal; + hideGroupAutoComplete(); + } + }); + // list view + dojo.query(document).delegate("#layoutList", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + if(configOptions.defaultLayout !== 'list'){ + configOptions.defaultLayout = 'list'; + dojo.query('.toggleLayout li').removeClass('active'); + dojo.query(this).addClass('active'); + addSpinner("layoutSpinner"); + queryMaps(dataOffset,searchVal); + } + } + }); + // grid view + dojo.query(document).delegate("#layoutGrid", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + if(configOptions.defaultLayout !== 'grid'){ + configOptions.defaultLayout = 'grid'; + dojo.query('.toggleLayout li').removeClass('active'); + dojo.query(this).addClass('active'); + addSpinner("layoutSpinner"); + queryMaps(dataOffset,searchVal); + } + } + }); + // Reset X click + dojo.query(document).delegate(".iconInput .iconReset", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + var obj = dojo.query(this).prevAll('input'); + clearAddress(obj); + } + }); + // auto complete && address specific action listeners + dojo.query(document).delegate("#searchGroup", "onkeyup", function(e){ + checkAddressStatus(this); + var aquery = dojo.query(this).attr('value')[0]; + var alength = aquery.length; + if(e.keyCode === 13 && aquery !== '') { + clearTimeout (timer); + var textVal = dojo.query(this).attr('value'); + if(textVal !== prevVal){ + searchVal = textVal; + addSpinner("groupSpinner"); + queryMaps(1,textVal); + prevVal = searchVal; + } + hideGroupAutoComplete(); + } + else if(e.keyCode === 38) { + dojo.query('#groupAutoComplete li:last')[0].focus(); + } + else if(e.keyCode === 40) { + dojo.query('#groupAutoComplete li:first')[0].focus(); + } + else if(alength >= 2){ + clearTimeout (timer); + timer = setTimeout(function(){ + groupAutoComplete(aquery); + }, 250); + } + else{ + hideGroupAutoComplete(); + } + }); + // Autocomplete key up and click + dojo.query(document).delegate("#groupAutoComplete ul li", "onclick,keyup", function(e){ + if(event.type === 'click' || (e.type === 'keyup' && e.keyCode === 13)){ + // hide auto complete + hideGroupAutoComplete(); + // get result number + var locNum = dojo.indexOf(dojo.query('#groupAutoComplete ul li'), this); + // if map has a url + var mapURL; + if(ACObj[locNum].url){ + mapURL = ACObj[locNum].url; + } + else{ + // item url + mapURL = getViewerURL(configOptions.mapViewer, ACObj[locNum].id); + } + // load map + window.location = mapURL; + } + else if(e.type === 'keyup' && e.keyCode === 40) { + dojo.query(this).next('li')[0].focus(); + } + else if(e.type === 'keyup' && e.keyCode === 38) { + dojo.query(this).prev('li')[0].focus(); + } + }); +} +/*------------------------------------*/ +// Init +/*------------------------------------*/ +function init(){ + // set default data offset + if(!dataOffset){ + dataOffset = 0; + } + // set loading text + var node = dojo.byId('featuredLoading'); + setNodeHTML(node, i18n.viewer.groupPage.loadingText); + // Query group and then query maps + queryGroup(function(){ + // insert home items + insertHomeContent(); + // Configure grid/list and search + configLayoutSearch(); + // query for maps + queryMaps(); + }); + // set up event delegations + setDelegations(); +}
\ No newline at end of file diff --git a/javascript/map/layout.js b/javascript/map/layout.js new file mode 100644 index 0000000..5352085 --- /dev/null +++ b/javascript/map/layout.js @@ -0,0 +1,905 @@ +// Dojo Requires +dojo.require("esri.arcgis.utils"); +dojo.require("esri.IdentityManager"); +dojo.require("esri.arcgis.Portal"); +dojo.require("dojo.NodeList-manipulate"); +dojo.require("dojo.NodeList-traverse"); +dojo.require("dojox.NodeList.delegate"); +dojo.require("dijit.Dialog"); +dojo.require("dojo.io.script"); +dojo.require("dojo.number"); +// Map Only +dojo.require("esri.map"); +dojo.require("esri.dijit.Legend"); +dojo.require("esri.dijit.Scalebar"); +dojo.require("esri.dijit.OverviewMap"); +dojo.require("esri.dijit.BasemapGallery"); +dojo.require("esri.tasks.locator"); +// Localization +dojo.requireLocalization("esriTemplate","template"); +/*------------------------------------*/ +// on dojo load +/*------------------------------------*/ +dojo.addOnLoad(function(){ + // set default options + setDefaultConfigOptions(); + // set app ID settings and call setWebmap after + setAppIdSettings(function(){ + // create portal + createPortal(function(){ + // query group info + queryGroup(function(){ + // set webmap info + setWebmap(); + }); + }); + }); +}); +/*------------------------------------*/ +// Sets the webmap to load +/*------------------------------------*/ +function setWebmap(){ + // if webmap set + if(configOptions.webmap) { + // init map page + initMap(); + } + // get first map in group if no webmap is set + else{ + // call featured maps function to get 1 webmap + queryArcGISGroupItems({ + // settings + id_group: configOptions.group, + searchType: "Web Map", + filterType: "Web Mapping Application", + sortField: configOptions.sortField, + sortOrder: configOptions.sortOrder, + perPage: 1, + // executed after ajax is returned + callback: function(obj, data){ + // if group has at least 1 webmap + if(data.results.length > 0){ + // set webmap + configOptions.webmap = data.results[0].id; + // init map page + initMap(); + } + else{ + // show error dialog + var dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.noSearchResults + }); + dialog.show(); + } + } + }); + } +} +/*------------------------------------*/ +// Toggle full screen map view +/*------------------------------------*/ +function toggleFullscreenMap(value){ + var buttonText; + // Record center of map + mapCenter = map.extent.getCenter(); + // if true, fullscreen + if(value){ + // button text + buttonText = i18n.viewer.mapPage.exitFullscreen; + // change html class + dojo.query("html").addClass('fullScreen'); + // set buttton classes and text + dojo.query("#fullScreen").attr('title',buttonText); + // toggle global variable + mapFullscreen = true; + } + // exit fullscreen + else{ + // button text + buttonText = i18n.viewer.mapPage.enterFullscreen; + // change html class + dojo.query("html").removeClass('fullScreen'); + // set buttton classes and text + dojo.query("#fullScreen").attr('title',buttonText); + // toggle global variable + mapFullscreen = false; + } + // reset center of map + resizeMapAndCenter(); +} +/*------------------------------------*/ +// Tabs +/*------------------------------------*/ +function tabMenu(menuObj, buttonObj){ + // hide all tabs + dojo.query('.tabMenu').style('display','none'); + // remove selected button class + dojo.query('#tabMenu .toggleButton').removeClass('buttonSelected'); + // show new tab + dojo.query(menuObj).style('display','block'); + // set new tab button to selected + dojo.query(buttonObj).addClass('buttonSelected'); +} +/*------------------------------------*/ +// Map Buttons +/*------------------------------------*/ +function setInnerMapButtons(){ + var html = ''; + // fullscreen button + html += '<div tabindex="0" title="' + i18n.viewer.mapPage.enterFullscreen + '" class="mapButton buttonSingle" id="fullScreen"><span class="fullScreenButton"> </span></div>'; + // fullscreen button + dojo.query(document).delegate("#fullScreen", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + // if currently in full screen + if(!mapFullscreen){ + // enter fullscreen + toggleFullscreenMap(true); + } + else{ + // exit fullscreen + toggleFullscreenMap(false); + } + } + }); + // if gelocation is available + if(navigator.geolocation){ + html += '<div tabindex="0" id="geoButton" title="' + i18n.viewer.mapPage.geoLocateTitle + '" class="mapButton buttonSingle"><span class="geoLocateButton"> </span></div>'; + dojo.query(document).delegate("#geoButton", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + navigator.geolocation.getCurrentPosition(geoLocateMap); + } + }); + } + // insert html + dojo.place(html, "map", "last"); +} +/*------------------------------------*/ +// Hide auto-complete +/*------------------------------------*/ +function hideAutoComplete(){ + dojo.query(".searchList").removeClass('autoCompleteOpen'); + dojo.query("#autoComplete").style('display','none'); +} +/*------------------------------------*/ +// Set map content +/*------------------------------------*/ +function setDelegations(){ + // show about button click + dojo.query(document).delegate("#showAbout", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + tabMenu('#aboutMenu',this); + } + }); + // show legend button click + dojo.query(document).delegate("#showLegend", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + tabMenu('#legendMenu',this); + } + }); + // escape button when in full screen view + dojo.query(document).delegate("body", "onkeyup", function(e){ + // if esc key and map is fullscreen + if(e.keyCode === 27 && mapFullscreen) { + // exit fullscreen + toggleFullscreenMap(false); + } + }); + // Search Button + dojo.query(document).delegate("#searchAddressButton", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + locate(); + hideAutoComplete(); + } + }); + // Clear address button + dojo.query(document).delegate(".iconInput .iconReset", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + var obj = dojo.query(this).prevAll('input'); + clearAddress(obj); + } + }); + // auto complete && address specific action listeners + dojo.query(document).delegate("#searchAddress", "onkeyup", function(e){ + checkAddressStatus(this); + var aquery = dojo.query(this).attr('value')[0]; + var alength = aquery.length; + // enter key + if(e.keyCode === 13 && aquery !== '') { + clearTimeout (timer); + clearLocate(); + locate(); + hideAutoComplete(); + } + // up arrow key + else if(e.keyCode === 38) { + dojo.query('#autoComplete li:last')[0].focus(); + } + // down arrow key + else if(e.keyCode === 40) { + dojo.query('#autoComplete li:first')[0].focus(); + } + // more than 3 chars + else if(alength >= 2){ + clearTimeout (timer); + timer = setTimeout(function(){ + autoComplete(aquery); + }, 250); + } + else{ + hideAutoComplete(); + } + }); + // autocomplete result key up + dojo.query(document).delegate("#autoComplete ul li", "onclick,keyup", function(e){ + if(e.type === 'click' || (e.type === 'keyup' && e.keyCode === 13)){ + var locTxt = dojo.query(this).text(); + var locNum = dojo.indexOf(dojo.query('#autoComplete ul li'), this); + dojo.query('#searchAddress').attr('value', locTxt); + showResults(ACObj, locNum); + hideAutoComplete(); + } + else if(e.type === 'keyup' && e.keyCode === 40) { + dojo.query(this).next('li')[0].focus(); + } + else if(e.type === 'keyup' && e.keyCode === 38) { + dojo.query(this).prev('li')[0].focus(); + } + }); + // clear address + dojo.query(document).delegate("#clearAddress", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + clearLocate(); + hideAutoComplete(); + } + }); + // toggle legend layers + dojo.query(document).delegate("#mapLayerToggle .toggleLayers", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + var dataAttr = dojo.query(this).attr('data-layers')[0].split(','); + for(var i = 0; i < dataAttr.length; i++){ + toggleLayerSwitch(dataAttr[i]); + } + } + }); +} +/*------------------------------------*/ +// show autocomplete +/*------------------------------------*/ +function showAutoComplete(geocodeResults){ + var aResults = ''; + var partialMatch = dojo.query("#searchAddress").attr('value')[0]; + var regex = new RegExp('(' + partialMatch + ')','gi'); + if(geocodeResults !== null){ + dojo.query(".searchList").addClass('autoCompleteOpen'); + ACObj = geocodeResults; + aResults += '<ul class="zebraStripes">'; + for(var i = 0; i < geocodeResults.length; i++){ + var layerClass = ''; + if(i % 2 === 0){ + layerClass = ''; + } + else{ + layerClass = 'stripe'; + } + aResults += '<li tabindex="0" class="' + layerClass + '">' + geocodeResults[i].address.replace(regex,'<span>' + partialMatch + '</span>') + '</li>'; + } + aResults += '</ul>'; + if(geocodeResults.length > 0){ + var node = dojo.byId('autoComplete'); + if(node){ + setNodeHTML(node, aResults); + dojo.style(node, 'display', 'block'); + } + } + else{ + hideAutoComplete(); + } + } +} +/*------------------------------------*/ +// map now loaded +/*------------------------------------*/ +function mapNowLoaded(layers){ + // Map Loaded Class + dojo.query("#map").addClass('mapLoaded'); + // if overview map + if(configOptions.showOverviewMap){ + //add the overview map + var overviewMapDijit = new esri.dijit.OverviewMap({ + map: map, + attachTo: "bottom-left", + visible: false + }); + overviewMapDijit.startup(); + } + initUI(layers); + // add popup theme + dojo.addClass(map.infoWindow.domNode, configOptions.theme); +} +/*------------------------------------*/ +// clear the locate graphic +/*------------------------------------*/ +function clearLocate() { + // if locate layer exists + if(locateResultLayer){ + // clear it + locateResultLayer.clear(); + } + // reset locate string + locateString = ""; +} +/*------------------------------------*/ +// Locate +/*------------------------------------*/ +function locate() { + var query = dojo.byId("searchAddress").value; + if(query){ + // add loading spinner + addSpinner("locateSpinner"); + // locate string + locateString = query; + // address object + var address = { + SingleLine: locateString + }; + // get address and set callback. * includes all fields in query + aoGeocoder.addressToLocations(address,["*"]); + } +} +/*------------------------------------*/ +// search box functions +/*------------------------------------*/ +function autoComplete(query) { + // set global locate string + locateString = query; + // address object + var address = { + SingleLine: locateString + }; + // get address and set callback. * includes all fields in query + aoGeoCoderAutocomplete.addressToLocations(address,["*"]); +} +/*------------------------------------*/ +// Show search results +/*------------------------------------*/ +function showResults(geocodeResults, resultNumber){ + // remove spinner + removeSpinner(); + // hide autocomplete + hideAutoComplete(); + // if result found + if(geocodeResults.length > 0) { + // num result variable + var numResult = 0; + // if result number + if(resultNumber){ + numResult = resultNumber; + } + // if point graphic set + if(configOptions.pointGraphic){ + // if locate results + if(locateResultLayer) { + locateResultLayer.clear(); + } + else{ + locateResultLayer = new esri.layers.GraphicsLayer(); + map.addLayer(locateResultLayer); + } + // create point marker + var pointMeters = esri.geometry.geographicToWebMercator(geocodeResults[0].location); + var pointSymbol = new esri.symbol.PictureMarkerSymbol(configOptions.pointGraphic, 21, 25).setOffset(0,12); + var locationGraphic = new esri.Graphic(pointMeters,pointSymbol); + locateResultLayer.add(locationGraphic); + } + // set extent variables + var xminNew, yminNew, xmaxNew, ymaxNew; + // if no attributes set + if(!geocodeResults[numResult].hasOwnProperty('attributes')){ + geocodeResults[numResult].attributes = {}; + } + // if one of the extent properteis isn't set + if(!geocodeResults[numResult].attributes.hasOwnProperty('West_Lon') || !geocodeResults[numResult].attributes.hasOwnProperty('South_Lat') || !geocodeResults[numResult].attributes.hasOwnProperty('East_Lon') || !geocodeResults[numResult].attributes.hasOwnProperty('North_Lat')){ + xminNew = parseFloat(geocodeResults[numResult].location.x - 0.011); + yminNew = parseFloat(geocodeResults[numResult].location.y - 0.011); + xmaxNew = parseFloat(geocodeResults[numResult].location.x + 0.011); + ymaxNew = parseFloat(geocodeResults[numResult].location.y + 0.011); + } + else{ + xminNew = parseFloat(geocodeResults[numResult].attributes.West_Lon); + yminNew = parseFloat(geocodeResults[numResult].attributes.South_Lat); + xmaxNew = parseFloat(geocodeResults[numResult].attributes.East_Lon); + ymaxNew = parseFloat(geocodeResults[numResult].attributes.North_Lat); + } + // create new extent + var newExtent = new esri.geometry.Extent({ + xmin: xminNew, + ymin: yminNew, + xmax: xmaxNew, + ymax: ymaxNew, + spatialReference: map.extent.spatialReference + }); + // set extent converted to web mercator + map.setExtent(esri.geometry.geographicToWebMercator(newExtent)); + } + else{ + // show error dialog + var dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.noSearchResults + }); + dialog.show(); + } +} +/*------------------------------------*/ +// Basemap Gallery +/*------------------------------------*/ +function createBasemapGallery() { + var html = ''; + // insert HTML for basemap + html += '<div tabindex="0" class="silverButton buttonSingle" id="basemapButton"><span class="basemapArrowButton"> </span>' + i18n.viewer.mapPage.switchBasemap + '</div>'; + html += '<div class="clear"></div>'; + html += '<div id="basemapGallery"></div>'; + // if node exists + var node = dojo.byId("basemapContainer"); + setNodeHTML(node, html); + //add the basemap gallery, in this case we'll display maps from ArcGIS.com including bing maps + var basemapGallery = new esri.dijit.BasemapGallery({ + showArcGISBasemaps: true, + bingMapsKey: configOptions.bingMapsKey, + map: map + }, dojo.create("div")); + dojo.byId("basemapGallery").appendChild(basemapGallery.domNode); + // start it up! + basemapGallery.startup(); + // if something bad happened + dojo.connect(basemapGallery, "onError", function(msg){ + // show error dialog + var dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: msg + }); + dialog.show(); + }); + // toggle basemap button + dojo.query(document).delegate("#basemapButton", "onclick,keyup", function(event){ + if(event.type === 'click' || (event.type === 'keyup' && event.keyCode === 13)){ + // get nodes + var buttonNode = dojo.query(this); + var node = dojo.byId('basemapGallery'); + // if they exist + if(node && buttonNode){ + // remove classes + buttonNode.removeClass('buttonSelected open'); + // if already shown + if(dojo.style(node, 'display') === 'block'){ + // hide + dojo.style(node, 'display', 'none'); + } + else{ + // show and add class + dojo.style(node, 'display', 'block'); + buttonNode.addClass('buttonSelected open'); + } + } + } + }); +} +/*------------------------------------*/ +// Set search address html +/*------------------------------------*/ +function setAddressContainer(){ + var html = ''; + html += '<div class="grid_4 alpha searchListCon">'; + if(configOptions.locatorserviceurl && configOptions.showMapSearch){ + html += '<ul class="searchList">'; + html += '<li id="mapSearch" class="iconInput">'; + html += '<input tabindex="0" placeholder="' + i18n.viewer.mapPage.findPlaceholder + '" title="' + i18n.viewer.mapPage.findLocation + '" id="searchAddress" value="" autocomplete="off" type="text" tabindex="1">'; + html += '<div tabindex="0" title="' + i18n.viewer.main.clearSearch + '" class="iconReset" id="clearAddress"></div>'; + html += '</li>'; + html += '<li class="searchButtonLi" title="' + i18n.viewer.mapPage.findLocation + '" id="searchAddressButton"><span tabindex="0" class="silverButton buttonRight"><span class="searchButton"> </span></span></li>'; + html += '<li id="locateSpinner" class="spinnerCon"></li>'; + html += '</ul>'; + html += '<div class="clear"></div>'; + html += '<div id="acCon">'; + html += '<div id="autoComplete" class="autoComplete"></div>'; + html += '</div>'; + html += '<div class="clear"></div>'; + } + else{ + html += ' '; + } + html += '</div>'; + html += '<div class="grid_5 omega basemapConRel"><div id="basemapContainer"> </div>'; + html += '</div>'; + html += '<div class="clear"></div>'; + // Set + var node = dojo.byId("addressContainer"); + setNodeHTML(node, html); +} +/*------------------------------------*/ +// Insert Menu Tab HTML +/*------------------------------------*/ +function insertMenuTabs(){ + var html = ''; + html += '<div tabindex="0" title="' + i18n.viewer.sidePanel.legendButtonTitle + '" id="showLegend" class="toggleButton buttonLeft buttonSelected">' + i18n.viewer.sidePanel.legendButton + '</div>'; + html += '<div tabindex="0" title="' + i18n.viewer.sidePanel.aboutButtonTitle + '" id="showAbout" class="toggleButton buttonRight">' + i18n.viewer.sidePanel.aboutButton + '</div>'; + html += '<div class="clear"></div>'; + // Set + var node = dojo.byId("tabMenu"); + setNodeHTML(node, html); +} +/*------------------------------------*/ +// Add bottom map buttons +/*------------------------------------*/ +function addBottomMapButtons(){ + var html = ''; + if(configOptions.showExplorerButton && !isMobileUser()){ + // add open in explorer button + html += '<a tabindex="0" target="_blank" href="' + getViewerURL('explorer', configOptions.webmap) + '" class="mapButton buttonSingle">' + i18n.viewer.mapPage.openInExplorer + '</a>'; + } + if(configOptions.showArcGISOnlineButton){ + // add open in arcgis button + html += '<a tabindex="0" target="_blank" href="' + getViewerURL('arcgis', configOptions.webmap) + '" class="mapButton buttonSingle">' + i18n.viewer.mapPage.openInArcGIS + '</a>'; + } + // If mobile user + if(isMobileUser() && configOptions.showMobileButtons){ + // add button + html += '<a tabindex="0" href="' + getViewerURL('mobile', configOptions.webmap) + '" class="mapButton buttonSingle">' + i18n.viewer.mapPage.openInMobile + '</a>'; + // add app button + html += '<a tabindex="0" href="' + getViewerURL('mobile_app') + '" class="mapButton buttonSingle">Get Mobile App</a>'; // localize + } + if(html === ''){ + html = ' '; + } + // insert + var node = dojo.byId("mapButtons"); + setNodeHTML(node, html); +} +/*------------------------------------*/ +// Init Map +/*------------------------------------*/ +function initMap() { + // set map content + setDelegations(); + // set map buttons + setInnerMapButtons(); + // ITEM + var itemDeferred = esri.arcgis.utils.getItem(configOptions.webmap); + itemDeferred.addErrback(function(error) { + // show error dialog + dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.createMap + error + }); + dialog.show(); + // hide all content + hideAllContent(); + }); + itemDeferred.addCallback(function(itemInfo) { + var html = ''; + // if it's a webmap + if(itemInfo && itemInfo.item && itemInfo.item.type === 'Web Map'){ + // insert menu tab html + insertMenuTabs(); + // insert address html + setAddressContainer(); + // if no title set in config + if(!configOptions.mapTitle){ + configOptions.mapTitle = itemInfo.item.title; + } + // if no subtitle set in config + if(!configOptions.mapSnippet){ + configOptions.mapSnippet = itemInfo.item.snippet; + } + // if no description set in config + if(!configOptions.mapItemDescription){ + configOptions.mapItemDescription = itemInfo.item.description; + } + // Set title + var titleNode = dojo.byId("title"); + setNodeHTML(titleNode, configOptions.mapTitle || ""); + // Set subtitle + var subTitleNode = dojo.byId("subtitle"); + setNodeHTML(subTitleNode, configOptions.mapSnippet || ""); + // if showMoreInfo is set + if(configOptions.showMoreInfo){ + var d, dateLocale; + html = ''; + html += '<h2>' + i18n.viewer.mapPage.moreInformation + '</h2>'; + html += '<ul class="moreInfoList">'; + // Set owner + if(itemInfo.item.owner){ + html += '<li><strong>' + i18n.viewer.mapPage.ownerHeader + '</strong><br /><a href="' + getViewerURL('owner_page', false, itemInfo.item.owner) + '" target="_blank">' + itemInfo.item.owner + '</a></li>'; + } + // item page link + html += '<li>'; + html += '<a id="mapContentsLink" href="' + getViewerURL('item_page') + '" target="_blank">' + i18n.viewer.mapPage.arcgisLink + '</a>'; + html += '</li>'; + html += '</ul>'; + // set html to node + var mapMoreInfo = dojo.byId("mapMoreInfo"); + setNodeHTML(mapMoreInfo, html); + } + // Set description + var descriptionInfo = configOptions.mapItemDescription || ""; + var descNode = dojo.byId("descriptionContent"); + setNodeHTML(descNode, '<h2>' + i18n.viewer.mapPage.aboutHeader + '</h2>' + descriptionInfo + '<div class="clear"></div>'); + // set page title + if(configOptions.mapTitle){ + document.title = configOptions.siteTitle + ' | ' + configOptions.mapTitle; + } + else{ + document.title = configOptions.siteTitle; + } + // add bottom map buttons + addBottomMapButtons(); + // create map + var mapDeferred = esri.arcgis.utils.createMap(itemInfo, "map", { + mapOptions: { + slider: true, + sliderStyle: "small", + wrapAround180:true, + nav: false + }, + ignorePopups:false, + bingMapsKey: configOptions.bingMapsKey, + geometryServiceURL: configOptions.geometryserviceurl + }); + // map response + mapDeferred.addCallback(function(response) { + // set map + map = response.map; + var layers = response.itemInfo.itemData.operationalLayers; + // LAYER TOGGLE + if(configOptions.showLayerToggle && layers.length > 0){ + var html = ''; + var mapLayersNode = dojo.byId('mapLayers'); + if(mapLayersNode){ + html += '<h2>' + i18n.viewer.mapPage.layersHeader + '</h2>'; + html += '<table id="mapLayerToggle">'; + html += "<tbody>"; + for(j=0; j < layers.length; j++){ + var checked; + // if feature collection + if(layers[j].featureCollection){ + html += "<tr>"; + checked = ''; + if(layers[j].visibility){ + checked = 'checked="checked"'; + } + // check column + html += '<td class="checkColumn"><input tabindex="0" class="toggleLayers" id="layerCheckbox' + j + '" ' + checked + ' type="checkbox" data-layers="'; + // if feature collection layers + if(layers[j].featureCollection.layers){ + for(k = 0; k < layers[j].featureCollection.layers.length; k++){ + html += layers[j].featureCollection.layers[k].id; + // if not last + if(k !== (layers[j].featureCollection.layers.length - 1)){ + html += ","; + } + } + } + // csv + else{ + html += layers[j].id; + } + html += '" /></td>'; + // label column + html += '<td><label for="layerCheckbox' + j + '">' + layers[j].title + '</label></td>'; + html += "</tr>"; + } + else{ + html += "<tr>"; + checked = ''; + if(layers[j].visibility){ + checked = 'checked="checked"'; + } + // check column + html += '<td class="checkColumn"><input tabindex="0" class="toggleLayers" id="layerSingleCheckbox' + j + '" ' + checked + ' type="checkbox" data-layers="'; + html += layers[j].id; + html += '" /></td>'; + // label column + html += '<td><label for="layerSingleCheckbox' + j + '">' + layers[j].title + '</label></td>'; + html += "</tr>"; + } + } + html += "</tbody>"; + html += '</table>'; + html += '<div class="clear"></div>'; + setNodeHTML(mapLayersNode, html); + } + } + // ENDLAYER TOGGLE + if(map.loaded){ + mapNowLoaded(layers); + } + else{ + dojo.connect(map,"onLoad",function(){ + mapNowLoaded(layers); + }); + } + }); + mapDeferred.addErrback(function(error) { + // show error dialog + var dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.createMap + " : " + error + }); + dialog.show(); + // hide all content + hideAllContent(); + }); + // LOCATOR + aoGeocoder = new esri.tasks.Locator(configOptions.locatorserviceurl); + aoGeoCoderAutocomplete = new esri.tasks.Locator(configOptions.locatorserviceurl); + dojo.connect(aoGeocoder, "onAddressToLocationsComplete", showResults); + dojo.connect(aoGeoCoderAutocomplete, "onAddressToLocationsComplete", showAutoComplete); + itemDeferred.addErrback(function(error) { + var dialog; + // don't i18n this. I'ts returned from the server + if (error && error.message === "BingMapsKey must be provided.") { + dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.bingError + }); + dialog.show(); + } + else { + // show error dialog + dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.createMap + " : " + error + }); + dialog.show(); + // hide all content + hideAllContent(); + } + }); + } + else{ + // show error dialog + dialog = new dijit.Dialog({ + title: i18n.viewer.errors.general, + content: i18n.viewer.errors.createMap + }); + dialog.show(); + // hide all content + hideAllContent(); + } + }); +} +/*------------------------------------*/ +// TOGGLE LAYER +/*------------------------------------*/ +function toggleLayerSwitch(layerid){ + var layer = map.getLayer(layerid); + if(layer){ + //if visible hide the layer + if(layer.visible === true) { + layer.hide(); + } + //otherwise show + else { + layer.show(); + } + } +} +/*------------------------------------*/ +// BUILD LAYERS LIST +/*------------------------------------*/ +function buildLayersList(layers) { + //layers arg is response.itemInfo.itemData.operationalLayers; + var layerInfos = []; + dojo.forEach(layers, function (mapLayer, index) { + var layerInfo = {}; + if (mapLayer.featureCollection && mapLayer.type !== "CSV") { + if (mapLayer.featureCollection.showLegend === true) { + dojo.forEach(mapLayer.featureCollection.layers, function (fcMapLayer) { + if (fcMapLayer.showLegend !== false) { + layerInfo = { + "layer": fcMapLayer.layerObject, + "title": mapLayer.title, + "defaultSymbol": false + }; + if (mapLayer.featureCollection.layers.length > 1) { + layerInfo.title += " - " + fcMapLayer.layerDefinition.name; + } + layerInfos.push(layerInfo); + } + }); + } + } else if (mapLayer.showLegend !== false && mapLayer.layerObject) { + var showDefaultSymbol = false; + if (mapLayer.layerObject.version < 10.1 && (mapLayer.layerObject instanceof esri.layers.ArcGISDynamicMapServiceLayer || mapLayer.layerObject instanceof esri.layers.ArcGISTiledMapServiceLayer)) { + showDefaultSymbol = true; + } + layerInfo = { + "layer": mapLayer.layerObject, + "title": mapLayer.title, + "defaultSymbol": showDefaultSymbol + }; + //does it have layers too? If so check to see if showLegend is false + if (mapLayer.layers) { + var hideLayers = dojo.map(dojo.filter(mapLayer.layers, function (lyr) { + return (lyr.showLegend === false); + }), function (lyr) { + return lyr.id; + }); + if (hideLayers.length) { + layerInfo.hideLayers = hideLayers; + } + } + layerInfos.push(layerInfo); + } + }); + return layerInfos; +} +/*------------------------------------*/ +// INIT UI +/*------------------------------------*/ +function initUI(layers) { + // Set legend header + var node = dojo.byId('legendHeader'); + setNodeHTML(node, i18n.viewer.sidePanel.title); + // Set basemap gallery + if(configOptions.showBasemapGallery){ + createBasemapGallery(); + } + // Set map background image + dojo.query("#map").style('background-image','none'); + // Setup resize map + dojo.connect(window, "onresize", resizeMap); + //add scalebar + var scalebar = new esri.dijit.Scalebar({ + map: map, + scalebarUnit: i18n.viewer.main.scaleBarUnits + }); + // Legend Information + var layerInfo = buildLayersList(layers); + // Build Legend + if(layerInfo.length > 0){ + var legendDijit = new esri.dijit.Legend({ + map:map, + layerInfos:layerInfo + },"legendContent"); + legendDijit.startup(); + } + else{ + var legendContentNode = dojo.byId('legendContent'); + setNodeHTML(legendContentNode, i18n.viewer.errors.noLayers); + } +} +/*------------------------------------*/ +// Resize and Reposition Map +/*------------------------------------*/ +function mapResizeAndReposition(){ + map.resize(); + map.reposition(); +} +/*------------------------------------*/ +// Resize Map And Center +/*------------------------------------*/ +function resizeMapAndCenter(){ + clearTimeout(resizeTimer); + resizeTimer = setTimeout(function() { + mapResizeAndReposition(); + if(mapCenter.x && mapCenter.y){ + setTimeout(function() { + map.centerAt(mapCenter); + mapResizeAndReposition(); + }, 500); + } + }, 500); +} +/*------------------------------------*/ +// Resize Map +/*------------------------------------*/ +function resizeMap() { + clearTimeout(resizeTimer); + if(map){ + resizeTimer = setTimeout(function() { + mapResizeAndReposition(); + }, 500); + } +}
\ No newline at end of file diff --git a/nls/template.js b/nls/template.js new file mode 100644 index 0000000..3201957 --- /dev/null +++ b/nls/template.js @@ -0,0 +1,77 @@ +define({ + "root": ({ + "viewer": { + "main": { + "scaleBarUnits": "english", + "clearSearch": "Clear" + }, + "errors": { + "createMap": "Unable to create map", + "general": "Error", + "bingError": "Deploying this application requires your own Bing Maps key.", + "noLayers": "No operational layers", + "noSearchResults": "Sorry, no results were found.", + "noGroupResults": "The group could not be found.", + "noMatches": "No matches found.", + "noMapsFound": "No maps were found." + }, + "sidePanel": { + "title": "Legend", + "legendButton": "Legend", + "legendButtonTitle": "Map Legend", + "aboutButton": "About", + "aboutButtonTitle": "About Map", + "message": "No operational layers" + }, + "groupPage": { + "showAllMaps": "Show all maps", + "searchTitle": "Search this group", + "searchTitleShort": "Search", + "searchPlaceholder": "Search maps", + "itemTitle": "View map", + "gridSwitch": "Switch to Grid View", + "listSwitch": "Switch to List View", + "loadingText": "Loading Maps…" + }, + "mapPage": { + "findLocation": "Find a location", + "findPlaceholder": "Locate an address", + "aboutHeader": "About this map", + "layersHeader": "Layers", + "enterFullscreen": "Fullscreen View", + "exitFullscreen": "Exit Fullscreen", + "arcgisLink": "Item Details", + "moreInformation": "More Information", + "geoLocateTitle": "Use Current Location", + "openInMobile": "Open in Mobile App", + "openInArcGIS": "ArcGIS Online", + "openInExplorer": "ArcGIS Explorer", + "ownerHeader": "Owner:", + "switchBasemap": "Switch Basemap" + }, + "pagination": { + "previous": "Previous", + "next": "Next", + "first": "First Page", + "last": "Last Page", + "helip": "…", + "page": "Page" + } + } + }), + "ar": 1, + "de": 1, + "es": 1, + "fr": 1, + "it": 1, + "ja": 1, + "ko": 1, + "nl": 1, + "no": 1, + "pl": 1, + "pt-br": 1, + "ro": 1, + "ru": 1, + "sv": 1, + "zh-cn": 1 +});
\ No newline at end of file |