Skip to content

Commit

Permalink
Initial template check-in
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyhutchins committed Jul 2, 2014
0 parents commit 5c333c1
Show file tree
Hide file tree
Showing 119 changed files with 9,264 additions and 0 deletions.
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
basic-viewer-template
=====================
*Basic Viewer* is a configurable application template used to display a web map with a specified set of commonly used tools and options.

![Screen Shot](https://dl.dropboxusercontent.com/u/24627279/screenshots/Viewer_screenshot.png)

[View it live] (http://www.arcgis.com/apps/OnePane/Viewer/index.html?webmap=f5b13dbed07c46cdb783cf361833aa6b)

#Features
The template can be configured using the following options:

- **Map:** Choose the web map used in your application.
- **Color Scheme:** Choose a color scheme for the application.
- **Show Title:** Choose whether to include an application title.
- **Title Text:** The application title. The default title is the web map name.
- **Logo:** Choose a custom logo for your application.
- **Overview Map:** Display a retractable overview map to add context for panning and zooming.
- **Legend:** Display a legend for map layers. *
- **Details:** Display the web map item description. *
- **Editor:** Allows users to interactively create, modify, or delete features in editable layers. *
- **Print:** Enables printing the map at the current extent. It can be configured to include a legend and supports different layout options.
- **Layer List:** Enables toggling the visibility of operational layers within the web map. *
- **Basemaps:** Enables the display of the basemap gallery.
- **Bookmarks:** Enables the use of web map bookmarks for navigation. *
- **Measure:** Enables measure tool for interactive area, length, and point measurement.
- **Share:** Allows users to share the application with others via email, Twitter, or Facebook.
- **Search:** Displays the Search box to enable navigation to addresses and places.


*These options will appear in the application when the web map has properties or layers that support them.



#Instructions

1. Download and unzip the .zip file or clone the repo.
2. Web-enable the directory.
3. Access the .html page in a browser

Note: If your application edits features in a feature service, contains secure services or web maps that aren't shared publicly or generates requests that exceed 200 characters you may need to setup and use a proxy page. Common situations where you may exceed the URL length are using complex polygons as input to a task or specifying a spatial reference using well-known text (WKT). For details on installing and configuring a proxy page see [Using a proxy page](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html).

For addtional customization options view the [wiki](https://github.com/Esri/basic-viewer-template/wiki).

#Requirements

- Notepad or HTML editor
- Some background with HTML, CSS and JavaScript
- Experience with the ArcGIS API for JavaScript is helpful.

#Resources

- [ArcGIS API for JavaScript Resource Center](http://help.arcgis.com/en/webapi/javascript/arcgis/index.html)

#Issues
Found a bug or want to request a new feature? Please let us know by submitting an issue.

#Contributing
Anyone and everyone is welcome to contribute.

#Licensing

Copyright 2012 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.
[](Esri Tags: ArcGIS Online Web Application Templates)
[](Esri Language: JavaScript)
35 changes: 35 additions & 0 deletions config/commonConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
define(
[],
function() {
var config = {
bingMapsKey:"Arrzu_Koi7htDRMIwm6kTe0Nqh8FvVdN17blcaJVTEhn87z-tIYJh2LgBNbJS4fv",
units: null,
helperServices: {
geometry:{
url: location.protocol + "//utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"
},
printTask: {
url: location.protocol + "//utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
},
elevationSync:{
url: location.protocol + "//elevation.arcgis.com/arcgis/rest/services/Tools/ElevationSync/GPServer"
},
geocode: [{
url: location.protocol + "//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"
}]
},
queryForOrg: true
};

// could use a has() test to optionally populate some global
// property so that the stuff defined is in some global identifier
//
// instead, just populate a global, will need to remove the next line when
// when we remove support for loading modules with dojo.require
// which will be when we move to Dojo 2.0
commonConfig = config;
// instead of using a global, this should probably be added to some namespace...
// do the templates have a common namespace that they use?

return config;
});
97 changes: 97 additions & 0 deletions config/defaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*global define,location */
/*jslint sloppy:true */
/*
| Copyright 2014 Esri
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
*/
define({
//Default configuration settings for the application. This is where you'll define things like a bing maps key,
//default web map, default app color theme and more. These values can be overwritten by template configuration settings and url parameters.
"appid": "",
"webmap": "f5b13dbed07c46cdb783cf361833aa6b",
"oauthappid": null, //"AFTKRmv16wj14N3z",
//Group templates must support a group url parameter. This will contain the id of the group.
//group: "",
//Enter the url to the proxy if needed by the application. See the 'Using the proxy page' help topic for details
//http://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html
"proxyurl": "",
"bingKey": "", //Enter the url to your organizations bing maps key if you want to use bing basemaps
//Defaults to arcgis.com. Set this value to your portal or organization host name.
"sharinghost": location.protocol + "//" + "www.arcgis.com",
//When true the template will query arcgis.com for default settings for helper services, units etc. If you
//want to use custom settings for units or any of the helper services set queryForOrg to false then enter
//default values for any items you need using the helper services and units properties.
"queryForOrg": true,
//If you need localization set the localize value to true to get the localized strings
//from the javascript/nls/resource files.
//Note that we've included a placeholder nls folder and a resource file with one error string
//to show how to setup the strings file.
"localize": true,
"units": null,
//Theme defines the background color of the title area and tool dialog
//Color defines the text color for the title and details. Note that
//both these values must be specified as hex colors.
"theme": "#80ab00",
"color": "#fff",
//Specify the tool icon color for the tools on the toolbar and the menu icon.
// Valid values are white and black.
"icons": "white",
"logo": null,
//Set of tools that will be added to the toolbar
"tools": [
{"name": "legend", "enabled": true},
{"name": "bookmarks", "enabled": true},
{"name": "layers", "enabled": true},
{"name": "basemap", "enabled": true},
{"name": "overview", "enabled": true},
{"name": "measure", "enabled": true},
{"name": "edit", "enabled": true, "toolbar": false},
{"name": "print", "enabled": true, "legend": true, "layouts":false, "format":"pdf"},
{"name": "details", "enabled": true},
{"name": "share", "enabled": true}
],
//Set the active tool on the toolbar. Note home and locate can't be the active tool.
"activeTool": "legend",
//Add the geocoding tool next to the title bar
"search": true,
//Add the home extent button to the toolbar
"home": true,
//Add the geolocation button on the toolbar. Only displayed if browser supports geolocation
"locate": true,
//Specify a title for the application. If not provided the web map title is used.
"title": null,
//This option demonstrates how to handle additional custom url parameters. For example
//if you want users to be able to specify lat/lon coordinates that define the map's center or
//specify an alternate basemap via a url parameter.
"urlItems": [
"extent,color"
],
//Replace these with your own bitly key
"bitlyLogin": "esrimarketing",
"bitlyKey": "R_52f84981da0e75b23aea2b3b20cbafbc",
"helperServices": {
"geometry": {
"url": null
},
"printTask": {
"url": null
},
"elevationSync": {
"url": null
},
"geocode": [{
"url": null
}]
}
});
1 change: 1 addition & 0 deletions css/ie.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5c333c1

Please sign in to comment.