Add RESTful compatibility support
This commit is contained in:
@@ -139,8 +139,13 @@ OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.Vers
|
||||
// Get first get method
|
||||
if (http.get[0].constraints) {
|
||||
var constraints = http.get[0].constraints;
|
||||
if (!constraints.GetEncoding.allowedValues.KVP &&
|
||||
constraints.GetEncoding.allowedValues.REST) {
|
||||
var allowedValues = constraints.GetEncoding.allowedValues;
|
||||
|
||||
// The OGC documentation is not clear if we should use
|
||||
// REST or RESTful, ArcGis use RESTful,
|
||||
// and OpenLayers use REST.
|
||||
if (!allowedValues.KVP &&
|
||||
(allowedValues.REST || allowedValues.RESTful)) {
|
||||
requestEncoding = "REST";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user