-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fullscreen
- Loading branch information
Showing
80 changed files
with
692 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Application configuration | ||
The application will load by default it will load the `localConfig.js` | ||
|
||
You can load a custom configuration by passing the `localConfig` argument in query string: | ||
|
||
``` | ||
localhost:8081/?localConfig=myConfig#/viewer/openlayers/0 | ||
``` | ||
|
||
|
||
The **localConfig** file contains the main information about URLs to load and plugins to load in the various modes. | ||
|
||
This is the main structure: | ||
``` | ||
{ | ||
// URL of geoStore | ||
"geoStoreUrl": "rest/geostore/", | ||
// printURL the url of the print service, if any | ||
"printUrl": "/geoserver-test/pdf/info.json", | ||
// a string or an object for the proxy URL. | ||
"proxyUrl": { | ||
// if it is an object, the url entry holds the url to the proxy | ||
"url": "/MapStore2/proxy/?url=", | ||
// useCORS array contains a list of services that support CORS and so do not need a proxy | ||
"useCORS": ["http://nominatim.openstreetmap.org", "https://nominatim.openstreetmap.org"] | ||
}, | ||
// API keys for bing and mapquest services | ||
"bingApiKey", | ||
"mapquestApiKey", | ||
// path to the translation files directory (if different from default) | ||
"translationsPath", | ||
// if true, every ajax and mapping request will be authenticated with the configurations if match a rule | ||
"useAuthenticationRules": true | ||
// the athentication rules to match | ||
"authenticationRules": [ | ||
{ // every rule has a `urlPattern` regex to match | ||
"urlPattern": ".*geostore.*", | ||
// and a authentication `method` to use (basic, authkey) | ||
"method": "basic" | ||
}, { | ||
"urlPattern": "\\/geoserver.*", | ||
"method": "authkey" | ||
}, | ||
// optional state initializer (it will override the one defined in appConfig.js) | ||
"initialState": { | ||
// default initial state for every mode (will override initialState imposed by plugins reducers) | ||
"defaultState": { | ||
... | ||
}, | ||
// mobile override (defined properties will overide default in mobile mode) | ||
"mobile": { | ||
... | ||
} | ||
} | ||
"plugins": { | ||
// plugins to load for the mobile mode | ||
"mobile": [...] | ||
// plugins to load for the desktop mode | ||
"desktop": [...] | ||
// plugins to load for the embedded mode | ||
"embedded": [...] | ||
// plugins to load for the myMode mode | ||
"myMode": [...] | ||
} | ||
], | ||
``` | ||
If you are building your own app, you can choose to create your custom modes or force one of them by passing the `mode` parameter in the query string. | ||
|
||
For configuring plugins, see the [Configuring Plugins Section](plugins-documentation) and the [plugin reference page](./api/plugins) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ module.exports = { | |
}], | ||
"toolsOptions": { | ||
"test": { | ||
"label": "ciao" | ||
"label": "Hello" | ||
} | ||
... | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright 2017, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const expect = require('expect'); | ||
const {API} = require('../searchText'); | ||
const axios = require('axios'); | ||
|
||
describe('Test correctness of the searchText APIs', () => { | ||
|
||
const myFun = (param) => { | ||
// do stuff | ||
return param; | ||
}; | ||
function fun() { | ||
return axios.get('base/web/client/test-resources/featureCollectionZone.js'); | ||
} | ||
|
||
it('setter and getter services', (done) => { | ||
let servName = "myService"; | ||
API.Utils.setService(servName, myFun); | ||
try { | ||
expect(API.Services).toExist(); | ||
expect(API.Services[servName]).toExist(); | ||
expect(API.Utils.getService(servName)).toExist(); | ||
done(); | ||
} catch(ex) { | ||
done(ex); | ||
} | ||
}); | ||
|
||
let serviceType = 'myCustomService'; | ||
it('setService', (done) => { | ||
API.Utils.setService(serviceType, fun); | ||
expect(API.Utils.getService(serviceType)).toBe(fun); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.