Skip to content

Commit

Permalink
Version update, greek support, bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyhutchins committed Feb 26, 2015
1 parent b89bd7b commit 6bd1e88
Show file tree
Hide file tree
Showing 23 changed files with 1,231 additions and 937 deletions.
26 changes: 21 additions & 5 deletions README.md
Expand Up @@ -33,13 +33,29 @@ The template can be configured using the following options:

#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
## Instructions

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).
1. Download and unzip the .zip file or clone the repository.
2. Web-enable the directory.
3. Access the .html page.
4. Start writing your template!

For addtional customization options view the [wiki](https://github.com/Esri/basic-viewer-template/wiki).
[New to Github? Get started here.](https://github.com/)

## Deploying

1. To deploy this application, download the template from Portal/ArcGIS Online and unzip it.
2. Copy the unzipped folder containing the web app template files, such as index.html, to your web server. You can rename the folder to change the URL through which users will access the application. By default the URL to the app will be `http://<Your Web Server>/<app folder name>/index.html`
3. Change the sharing host, found in defaults.js inside the config folder for the application, to the sharing URL for ArcGIS Online or Portal. For ArcGIS Online users, keep the default value of www.arcgis.com or specify the name of your organization.
- ArcGIS Online Example: `"sharinghost": location.protocol + "//" + “<your organization name>.maps.arcgis.com`
- Portal Example where `arcgis` is the name of the Web Adaptor: `"sharinghost": location.protocol + "//" + "webadaptor.domain.com/arcgis"`
4. If you are using Portal or a local install of the ArcGIS API for JavaScript, change all references to the ArcGIS API for JavaScript in index.html to refer to your local copy of the API. Search for the references containing `"//js.arcgis.com/3.13"` and replace this portion of the reference with the url to your local install.
- For example: `"//webadaptor.domain.com/arcgis/jsapi/jsapi"` where `arcgis` is the name of your Web Adaptor.
5. Copy a map or group ID from Portal/ArcGIS Online and replace the default web map ID in the application’s default.js file. You can now run the application on your web server or customize the application further.

**Note:** If your application edits features in a feature service, contains secure services or web maps that aren't shared publicly, or generate requests that exceed 200 characters, you may need to set up 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 the proxy](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html). If you do not have an Internet connection, you will need to access and deploy the ArcGIS API for JavaScript documentation from [developers.arcgis.com](https://developers.arcgis.com/).

For addtional customization options view the [wiki](https://github.com/Esri/Viewer/wiki/Viewer-Template-Wiki).

#Requirements

Expand Down
35 changes: 0 additions & 35 deletions config/commonConfig.js

This file was deleted.

21 changes: 11 additions & 10 deletions config/defaults.js
Expand Up @@ -53,7 +53,7 @@ define({
{"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": "print", "enabled": true, "legend": false, "layouts":false, "format":"pdf"},
{"name": "details", "enabled": true},
{"name": "share", "enabled": true}
],
Expand All @@ -62,23 +62,24 @@ define({
"activeTool": "legend",
//Add the geocoding tool next to the title bar.
"search": true,
"locationSearch": true,
//When searchExtent is true the locator will prioritize results within the current map extent.
"searchExtent": false,
"searchLayers":[{
"id": "",
"fields": []
}],
//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,
//When true display a scalebar on the map
"scalebar": false,
//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"
],
"title": "",
"level": null,
"center": null,
//Replace these with your own bitly key
"bitlyLogin": "esrimarketing",
"bitlyKey": "R_52f84981da0e75b23aea2b3b20cbafbc"
"bitlyLogin": "",
"bitlyKey": ""
});
50 changes: 50 additions & 0 deletions config/templateConfig.js
@@ -0,0 +1,50 @@
/*global define */
/*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({
// When true, the template will query arcgis.com for the webmap item.
"queryForWebmap": true,
// When true, the template will query arcgis.com for the group's information.
"queryForGroupInfo": false,
// When true, the template will query arcgis.com for the items contained within the group
"queryForGroupItems": false,
//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.
"queryForLocale": true,
// These are the options specified for querying items within the group. Modify these to get more items. You can also call the public template.queryGroupItems() method with these options as a parameter.
"groupParams": {
q: "group:\"${groupid}\" AND -type:\"Code Attachment\"",
"sortField": "modified",
"sortOrder": "desc",
"num": 9,
"start": 0
},
//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": [
"color","extent", "center", "level" // example param. ?theme=<my theme>
],
// For esri hosted environments only. Will automatically create a sharingurl and proxyurl for the application.
esriEnvironment: false
});

0 comments on commit 6bd1e88

Please sign in to comment.