Skip to content

Commit

Permalink
Map Journal V1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory L'Azou committed Feb 29, 2016
1 parent 5c3ac50 commit 57de453
Show file tree
Hide file tree
Showing 153 changed files with 3,354 additions and 729 deletions.
9 changes: 0 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,6 @@
dest: 'deploy/'
}]
},
commonConfig: {
files: [{
expand: true,
cwd: 'src/app',
src:['commonConfig.js'],
dest: 'deploy/app'
}]
},
readme: {
files: [{
expand: true,
Expand Down Expand Up @@ -429,7 +421,6 @@

// Copy resources
'copy:config',
'copy:commonConfig',
'copy:resources',
'copy:commonResources',

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Story Map Journal is ideal when you want to combine narrative text with maps
[Map Journal page on Esri Story Maps website](http://storymaps.arcgis.com/en/app-list/map-journal/) |
[Download](http://links.esri.com/storymaps/map_journal_template_zip)

**Latest release is version 1.6.1**, if you want to be informed of new releases, we recommend you to watch this repository ([see GitHub help](https://help.github.com/articles/watching-repositories)). See the [release page](https://github.com/Esri/map-journal-storytelling-template-js/releases) for release notes.
**Latest release is version 1.7.0**, if you want to be informed of new releases, we recommend you to watch this repository ([see GitHub help](https://help.github.com/articles/watching-repositories)). See the [release page](https://github.com/Esri/map-journal-storytelling-template-js/releases) for release notes.

## Help content

Expand Down Expand Up @@ -167,14 +167,14 @@ Yes.

When the Journal is hosted in ArcGIS Online or Portal for ArcGIS, users that don't have access to the Journal or a webmap used in the Journal will be redirected to the ArcGIS Online sign-in page. It is not possible to display an authentication dialog in the Map Journal when the Journal is hosted in ArcGIS Online.

To use a premium layer in a public webmap, [follow that procedure](http://blogs.esri.com/esri/arcgis/2014/10/07/public-access-to-arcgis-online-premium-services/).

When the Journal is hosted on your web server, an authentication dialog will appear inside the application.

Note that for that authentication to work on some older browser (Internet Explorer 9) you need to install a proxy server on your web server to make sure the login credentials can be passed securely to ArcGIS Online. For more information, see the [Using the proxy](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html) in the ArcGIS API for JavaScript documentation.

Because of that limitation, we recommend that you configure the application to use OAuth. OAuth 2.0 based authentication is available for ArcGIS Online and Portal for ArcGIS users with developer or organizational accounts. Follow the procedure to [add an application](http://doc.arcgis.com/en/arcgis-online/share-maps/add-items.htm#ESRI_SECTION1_55703F1EE9C845C3B07BBD85221FB074) and [register an application](http://doc.arcgis.com/en/arcgis-online/share-maps/add-items.htm#ESRI_SECTION2_20AF85308FD548B5ADBAE28836F66D3F) to get an OAuth application ID. Once you have that application, open `index.html`, locate the `configOptions` section and fill the `oAuthAppId` property.

If you are using secured services but don't want users to have to authenticate, you can use a proxy to store the username/password to be used, see [Working with Proxy Services](https://developers.arcgis.com/authentication/working-with-proxies/#selfhosted-proxy-service), and add a proxy rules to specify what services need to use the proxy by editing `PROXY_RULES` in `app/config.js`.

### Deployment
Deploying a Map Journal require to use ArcGIS Online or Portal for ArcGIS. The Journal content have to be created using the Map Journal builder and will live in a Web Application Item.

Expand Down Expand Up @@ -242,7 +242,7 @@ Example of the same application displaying two stories:
* http://myserver.com/MapJournal/index.html?appid=c7ad1a55de0247a68454a76f251225a5

## Configuration
In addition to the configuration offered by the builder, the files `app/config.js` and `app/commonConfig.js` provide various settings. Documentation is provided in those files.
In addition to the configuration offered by the builder, the file `app/config.js` provide various additional settings. This is for example the place where you can override some settings like the list of Geocoder services to be used (changes override ArcGIS Online or your Organization default settings). See the documentation provided in that file for more details.

## Customize the look and feel

Expand Down Expand Up @@ -404,7 +404,6 @@ The application is structured as this:
| src/ | Main source code folder with index.html and the Eclipse project configuration |
| src/app/ | Javascript and CSS source code |
| src/app/config.js | App configuration file (loaded at execution time) |
| src/app/commonConfig.js | More configuration (only used when deployed outside of ArcGIS Online and Portal for ArcGIS) |
| **src/app/storymaps/common/** | Modules common across storymaps templates (main module is Core.js) |
| src/app/storymaps/common/builder/ | Builder modules (main module is Builder.js) |
| src/app/storymaps/common/mapcontrols/ | Map UI components (Overview, Legend) |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Storymaps-MapJournal",
"version": "1.6.1",
"version": "1.7.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-clean": "~0.4.0",
Expand Down
18 changes: 0 additions & 18 deletions src/app/commonConfig.js

This file was deleted.

25 changes: 24 additions & 1 deletion src/app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,32 @@ app.cfg = {
// Portal configuration
//

// Optional array of server that will leverage CORS (for developement or specific cross domain deployment)
// Optional array of servers that will leverage CORS (for development or specific cross domain deployment)
CORS_SERVER: [],

// Optional array of proxy rules
PROXY_RULES: [
/*{
urlPrefix: "http://services.arcgis.com/",
proxyUrl: "http://myserver.domain.com/DotNet/proxy.ash"
}*/
],

BING_MAPS_KEY: "",
HELPER_SERVICES: {
geometry: {
//url: location.protocol + "//utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"
},
geocode: [
/*
{
url: location.protocol + "//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
name: "My Geocoder"
}
*/
]
},

// Edit those to set a custom sharing or proxy URL
// You have to edit those only if your webmap is deployed on Portal for ArcGIS instance and if you are not deploying the template on the Portal webserver
// If you are using ArcGIS Online or deploying the template on a Portal instance, you don't have to edit those URL
Expand Down
3 changes: 1 addition & 2 deletions src/app/main-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ else {

require([
"storymaps/common/Core",
"storymaps/tpl/core/MainView",
"templateConfig/commonConfig.js?v=" + app.version
"storymaps/tpl/core/MainView"
], function(
Core,
MainView
Expand Down
9 changes: 1 addition & 8 deletions src/app/main-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ function getUrlVar(name)

function defineDojoConfig()
{
var path1 = location.pathname.replace(/\/[^/]+$/, '/'),
path2 = location.pathname.replace(/\/[^/]+$/, '');
var path1 = location.pathname.replace(/\/[^/]+$/, '/');

window.dojoConfig = {
parseOnLoad: true,
Expand All @@ -52,12 +51,6 @@ function defineDojoConfig()
name: 'storymaps',
location: path1 + 'app/storymaps'
},
{
name: "templateConfig",
// If the application is deployed on a Portal (apps path contains /apps/MapJournal/ or /home/MapJournal/)
// commonConfig.js is loaded from the parent folder, otherwise it's loaded from the app folder
location: (/(\/)([a-zA-Z0-9]+(\/))*(apps\/|home\/)([a-zA-Z0-9]+\/)/).test(document.location.pathname) ? path2.substr(0,path2.lastIndexOf('/MapJournal')) : path2.replace(/\/+$/, '') + '/app'
},
{
name: 'lib-app',
location: path1 + 'lib-app'
Expand Down
Loading

0 comments on commit 57de453

Please sign in to comment.