1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
/**
* APIFunction: Geoportal.GeoRMHandler.getContract
* Build the contract object from the Geoportal API.
* Default callback for Geoportal.GeoRMHandler.getConfig() method.
*
* Parameters:
* contract - {Object} information returned by the GeoRM service.
* The structure holding the key's contract is :
* * service - {String} the GeoRM service that has returned the contract;
* * key - {String} the API Key;
* * boundingBox - {Object} hold minx, miny, maxx, maxy values
* (longitudes, latitudes);
* * resources - {Array({Object})} hold all layers available for the
* key. Each object holds :
* * name - {String} name of layer;
* * type - {String} type of service for this layer (WMSC, ...);
* * url - {String} service's URL.
* * tokenTimeOut - {Integer} number of seconds for GeoRM time to
* live.
* If contract hold a 'error' property, the key has no contract!
*
* Returns:
* {Object} information needed by the Geoportal API stored in a global
* variable gGEOPORTALRIGHTSMANAGEMENT. This variable contains
* a property 'pending' whose value is the number of awaiting contrats.
* On error, the gGEOPORTALRIGHTSMANAGEMENT.apiKey.length is 0.
*/ |
Partager