BMResource

                封裝BM服務(wù)器資源訪問的Resource實(shí)例。此對(duì)象通常不直接實(shí)例化,請(qǐng)使用BMResource.fromId
                new BMResource(endpoint, endpointResource)
                Parameters:
                endpoint (Object) BM服務(wù)器資源終結(jié)點(diǎn)服務(wù)的結(jié)果。
                endpointResource (Resource) 用于檢索終結(jié)點(diǎn)的資源。
                See:

                Extends

                Members

                (readonly) credits : Array.<Credit>

                獲取資源屬性所需的信用。

                (readonly) extension : String

                資源的文件擴(kuò)展名。
                Inherited From:

                hasHeaders : Boolean

                如果資源具有請(qǐng)求頭,則為true。這相當(dāng)于檢查headers屬性是否有任何鍵。
                Inherited From:

                headers : Object

                將隨請(qǐng)求一起發(fā)送的其他HTTP頭。
                Inherited From:

                isBlobUri : Boolean

                如果資源引用blob uri,則為true。
                Inherited From:

                isCrossOriginUrl : Boolean

                如果資源引用跨源URL,則為true。
                Inherited From:

                isDataUri : Boolean

                如果資源引用數(shù)據(jù)URI,則為true。
                Inherited From:

                proxy : DefaultProxy

                加載資源時(shí)要使用的代理。
                Inherited From:

                (readonly) queryParameters : Object

                附加到URL的查詢參數(shù)。
                Inherited From:

                request : Request

                將要使用的請(qǐng)求對(duì)象。僅供內(nèi)部使用。
                Inherited From:

                retryAttempts : Number

                放棄前應(yīng)調(diào)用RetryCallback的次數(shù)。
                Inherited From:

                retryCallback : function

                當(dāng)請(qǐng)求此資源失敗時(shí)調(diào)用的函數(shù)。如果返回“真”或解析為“真”的承諾,將重試請(qǐng)求。
                Inherited From:

                (readonly) templateValues : Object

                用于替換URL中模板參數(shù)的鍵/值對(duì)。
                Inherited From:

                url : String

                替換模板值、追加查詢字符串并由代理(如果設(shè)置了)編碼的資源的URL。
                Inherited From:

                Methods

                (static) fromId(assetId) → {Promise.<BMResource>}
                異步創(chuàng)建實(shí)例。
                Parameters:
                assetId (Number) BM服務(wù)器mapid或terrainid。
                appendForwardSlash()
                向URL追加正斜杠。
                Inherited From:
                appendQueryParameters(params)
                組合指定的對(duì)象和現(xiàn)有查詢參數(shù)。這允許您一次添加多個(gè)參數(shù),而不是一次將它們添加到QueryParameters屬性中。
                Parameters:
                params (Object) 查詢參數(shù)
                Inherited From:
                clone(result) → {Resource}
                復(fù)制資源實(shí)例。
                Parameters:
                result (Resource) 存儲(chǔ)結(jié)果的對(duì)象。
                Inherited From:
                delete(options) → {Promise.<Object>|undefined}
                異步刪除給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為結(jié)果,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Parameters:
                options (Object)
                Name Description
                options.responseType
                String
                響應(yīng)類型。這控制返回的項(xiàng)的類型。
                options.headers
                Object
                與請(qǐng)求一起發(fā)送的附加HTTP頭(如果有)。
                options.overrideMimeType
                String
                重寫服務(wù)器返回的mime類型。
                Example
                resource.delete()
                  .then(function(body) {
                      // use the data
                  }).otherwise(function(error) {
                      // an error occurred
                  });
                Inherited From:
                See:
                fetch(options) → {Promise.<Object>|undefined}
                異步加載給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為結(jié)果,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。建議您使用更具體的函數(shù),如fetchjson、fetchblob等。
                Parameters:
                options (Object)
                Name Description
                options.responseType
                String
                響應(yīng)類型。這控制返回的項(xiàng)的類型。
                options.headers
                Object
                與請(qǐng)求一起發(fā)送的附加HTTP頭(如果有)。
                options.overrideMimeType
                String
                重寫服務(wù)器返回的mime類型。
                Example
                resource.fetch()
                  .then(function(body) {
                      // use the data
                  }).otherwise(function(error) {
                      // an error occurred
                  });
                Inherited From:
                See:
                fetchArrayBuffer() → {Promise.<ArrayBuffer>|undefined}
                異步加載資源作為原始二進(jìn)制數(shù)據(jù)。返回將在加載后解析為ArrayBuffer的承諾,或者在資源加載失敗時(shí)拒絕該承諾。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Example
                // load a single URL asynchronously
                resource.fetchArrayBuffer().then(function(arrayBuffer) {
                    // use the data
                }).otherwise(function(error) {
                    // an error occurred
                });
                Inherited From:
                See:
                fetchBlob() → {Promise.<Blob>|undefined}
                以blob的形式異步加載給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為blob,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Example
                // load a single URL asynchronously
                resource.fetchBlob().then(function(blob) {
                    // use the data
                }).otherwise(function(error) {
                    // an error occurred
                });
                Inherited From:
                See:
                fetchImage(options) → {Promise.<ImageBitmap>|Promise.<Image>|undefined}
                異步加載給定的映像資源。返回一個(gè)承諾,如果preferImageBitmap為真且瀏覽器支持createImageBitmap或加載后的Image將解析為ImageBitmap,如果圖像加載失敗則拒絕。
                Parameters:
                options (Object) 具有以下屬性的對(duì)象。
                Name Description
                options.preferBlob
                Boolean
                default false
                如果為真,我們將通過blob加載圖像。
                options.preferImageBitmap
                Boolean
                default false
                如果為真,則圖像將在提取期間解碼,并返回ImageBitmap
                options.flipY
                Boolean
                default false
                如果為真,則圖像將在解碼過程中垂直翻轉(zhuǎn)。僅當(dāng)瀏覽器支持createImageBitmap時(shí)適用。
                Example
                // load a single image asynchronously
                resource.fetchImage().then(function(image) {
                    // use the loaded image
                }).otherwise(function(error) {
                    // an error occurred
                });
                
                // load several images in parallel
                when.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
                    // images is an array containing all the loaded images
                });
                Inherited From:
                See:
                fetchJson() → {Promise.<Object>|undefined}
                以JSON的形式異步加載給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為JSON對(duì)象,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。此函數(shù)將“accept:application/json,*;/;*;;q=0.01”添加到請(qǐng)求頭(如果尚未指定)。
                Example
                resource.fetchJson().then(function(jsonData) {
                    // Do something with the JSON object
                }).otherwise(function(error) {
                    // an error occurred
                });
                Inherited From:
                See:
                fetchJsonp(callbackParameterName) → {Promise.<Object>|undefined}
                使用JSONP請(qǐng)求資源。
                Parameters:
                callbackParameterName (String) (default 'callback') 服務(wù)器需要的回調(diào)參數(shù)名。
                Example
                // load a data asynchronously
                resource.fetchJsonp().then(function(data) {
                    // use the loaded data
                }).otherwise(function(error) {
                    // an error occurred
                });
                Inherited From:
                See:
                fetchText() → {Promise.<String>|undefined}
                以文本形式異步加載給定資源。返回將在加載后解析為字符串的承諾,或者在資源加載失敗時(shí)拒絕該承諾。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Example
                // load text from a URL, setting a custom header
                var resource = new Resource({
                  url: 'http://someUrl.com/someJson.txt',
                  headers: {
                    'X-Custom-Header' : 'some value'
                  }
                });
                resource.fetchText().then(function(text) {
                    // Do something with the text
                }).otherwise(function(error) {
                    // an error occurred
                });
                Inherited From:
                See:
                fetchXML() → {Promise.<XMLDocument>|undefined}
                以XML的形式異步加載給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為XML文檔,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Example
                // load XML from a URL, setting a custom header
                bmgl.loadXML('http://someUrl.com/someXML.xml', {
                  'X-Custom-Header' : 'some value'
                }).then(function(document) {
                    // Do something with the document
                }).otherwise(function(error) {
                    // an error occurred
                });
                Inherited From:
                See:
                getBaseUri(includeQuery) → {String}
                返回資源的基本路徑。
                Parameters:
                includeQuery (Boolean) (default false) 是否包含來自URI的查詢字符串和片段
                Inherited From:
                getDerivedResource(options) → {Resource}
                返回相對(duì)于當(dāng)前實(shí)例的資源。除非在選項(xiàng)中被重寫,否則所有屬性與當(dāng)前實(shí)例保持相同。
                Parameters:
                options (Object) 具有以下屬性的對(duì)象
                Name Description
                options.url
                String
                將相對(duì)于當(dāng)前實(shí)例的URL解析的URL。
                options.queryParameters
                Object
                包含將與當(dāng)前實(shí)例的查詢參數(shù)組合的查詢參數(shù)的對(duì)象。
                options.templateValues
                Object
                用于替換模板值的鍵/值對(duì)(例如{x})。這些將與當(dāng)前實(shí)例的合并。
                options.headers
                Object
                default {}
                將發(fā)送的其他HTTP頭。
                options.proxy
                DefaultProxy
                加載資源時(shí)要使用的代理。
                options.retryCallback
                Resource~RetryCallback
                加載資源失敗時(shí)要調(diào)用的函數(shù)。
                options.retryAttempts
                Number
                放棄前應(yīng)調(diào)用RetryCallback的次數(shù)。
                options.request
                Request
                將要使用的請(qǐng)求對(duì)象。僅供內(nèi)部使用。
                options.preserveQueryParameters
                Boolean
                default false
                如果為true,則將保留當(dāng)前資源和派生資源中的所有查詢參數(shù)。如果為false,派生參數(shù)將替換當(dāng)前資源的參數(shù)。
                Inherited From:
                getUrlComponent(query, proxy) → {String}
                返回由代理處理的、查詢字符串可選的URL。
                Parameters:
                query (Boolean) (default false) 如果為true,則包含查詢字符串。
                proxy (Boolean) (default false) 如果為true,則在定義代理對(duì)象時(shí)處理該URL。
                Inherited From:
                head(options) → {Promise.<Object>|undefined}
                異步獲取給定資源的頭。返回一個(gè)承諾,該承諾將在加載后解析為結(jié)果,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Parameters:
                options (Object)
                Name Description
                options.responseType
                String
                響應(yīng)類型。這控制返回的項(xiàng)的類型。
                options.headers
                Object
                與請(qǐng)求一起發(fā)送的附加HTTP頭(如果有)。
                options.overrideMimeType
                String
                重寫服務(wù)器返回的mime類型。
                Example
                resource.head()
                  .then(function(headers) {
                      // use the data
                  }).otherwise(function(error) {
                      // an error occurred
                  });
                Inherited From:
                See:
                options(options) → {Promise.<Object>|undefined}
                異步獲取給定資源的選項(xiàng)。返回一個(gè)承諾,該承諾將在加載后解析為結(jié)果,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Parameters:
                options (Object)
                Name Description
                options.responseType
                String
                響應(yīng)類型。這控制返回的項(xiàng)的類型。
                options.headers
                Object
                與請(qǐng)求一起發(fā)送的附加HTTP頭(如果有)。
                options.overrideMimeType
                String
                重寫服務(wù)器返回的mime類型。
                Example
                resource.options()
                  .then(function(headers) {
                      // use the data
                  }).otherwise(function(error) {
                      // an error occurred
                  });
                Inherited From:
                See:
                patch(data, options) → {Promise.<Object>|undefined}
                異步地將數(shù)據(jù)修補(bǔ)到給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為結(jié)果,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Parameters:
                data (Object) 與資源一起發(fā)布的數(shù)據(jù)。
                options (Object)
                Name Description
                options.responseType
                String
                響應(yīng)類型。這控制返回的項(xiàng)的類型。
                options.headers
                Object
                與請(qǐng)求一起發(fā)送的附加HTTP頭(如果有)。
                options.overrideMimeType
                String
                重寫服務(wù)器返回的mime類型。
                Example
                resource.patch(data)
                  .then(function(result) {
                      // use the result
                  }).otherwise(function(error) {
                      // an error occurred
                  });
                Inherited From:
                See:
                post(data, options) → {Promise.<Object>|undefined}
                異步地將數(shù)據(jù)發(fā)布到給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為結(jié)果,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Parameters:
                data (Object) 與資源一起發(fā)布的數(shù)據(jù)。
                options (Object)
                Name Description
                options.data
                Object
                與資源一起發(fā)布的數(shù)據(jù)。
                options.responseType
                String
                響應(yīng)類型。這控制返回的項(xiàng)的類型。
                options.headers
                Object
                與請(qǐng)求一起發(fā)送的附加HTTP頭(如果有)。
                options.overrideMimeType
                String
                重寫服務(wù)器返回的mime類型。
                Example
                resource.post(data)
                  .then(function(result) {
                      // use the result
                  }).otherwise(function(error) {
                      // an error occurred
                  });
                Inherited From:
                See:
                put(data, options) → {Promise.<Object>|undefined}
                異步地將數(shù)據(jù)放入給定的資源。返回一個(gè)承諾,該承諾將在加載后解析為結(jié)果,或者在資源加載失敗時(shí)拒絕。使用xmlhttpRequest加載數(shù)據(jù),這意味著為了向另一個(gè)來源發(fā)出請(qǐng)求,服務(wù)器必須啟用跨來源資源共享(cors)頭。
                Parameters:
                data (Object) 與資源一起發(fā)布的數(shù)據(jù)。
                options (Object)
                Name Description
                options.responseType
                String
                響應(yīng)類型。這控制返回的項(xiàng)的類型。
                options.headers
                Object
                與請(qǐng)求一起發(fā)送的附加HTTP頭(如果有)。
                options.overrideMimeType
                String
                重寫服務(wù)器返回的mime類型。
                Example
                resource.put(data)
                  .then(function(result) {
                      // use the result
                  }).otherwise(function(error) {
                      // an error occurred
                  });
                Inherited From:
                See:
                setQueryParameters(params, useAsDefault)
                組合指定的對(duì)象和現(xiàn)有查詢參數(shù)。這允許您一次添加多個(gè)參數(shù),而不是一次將它們添加到QueryParameters屬性中。如果已經(jīng)設(shè)置了一個(gè)值,它將被替換為新值。
                Parameters:
                params (Object) 查詢參數(shù)
                useAsDefault (Boolean) (default false) 如果為真,參數(shù)將用作默認(rèn)值,因此只有在未定義參數(shù)時(shí)才會(huì)設(shè)置這些參數(shù)。
                Inherited From:
                setTemplateValues(template, useAsDefault)
                組合指定的對(duì)象和現(xiàn)有模板值。這允許您一次添加多個(gè)值,而不是一次將它們添加到TemplateValues屬性。如果已經(jīng)設(shè)置了一個(gè)值,它將成為一個(gè)數(shù)組,并附加新的值。
                Parameters:
                template (Object) 模板值
                useAsDefault (Boolean) (default false) 如果為真,這些值將用作默認(rèn)值,因此只有在未定義的情況下才會(huì)設(shè)置這些值。
                Inherited From:
                主站蜘蛛池模板: 亚洲另类专区欧美制服| 久久久久无码精品国产| 神乃麻美三点尽露写真| 国产成人精品福利网站在线观看 | 久久精品视频大全| 97精品一区二区视频在线观看| 日韩欧国产精品一区综合无码| 亚洲综合五月天欧美| 色偷偷狠狠色综合网| 国产精品亚洲欧美大片在线看| а√最新版地址在线天堂| 日韩一区二紧身裤| 亚洲国产第一区| 男生把女生桶爽| 国产一区二区三区无码免费| 窝窝午夜看片国产精品人体宴| 奶特别大的三级日本电影| 久久久不卡国产精品一区二区| 欧美xxxxx在线观看| 亚洲精品网站在线观看你懂的| 美女一区二区三区| 国产女人高潮抽搐叫床视频| 2021国产精品自产拍在线观看| 女人双腿搬开让男人桶| 中文字幕国产视频| 波多野结衣porn| 国产a级黄色片| 国产福利拍拍拍| 国产综合精品在线| www.中文字幕.com| 我和麻麻的混乱生活| 久久精品免视看国产陈冠希| 欧美性猛交xxx黑人猛交| 免费**毛片在线播放直播| 美女的尿口免费看软件| 国产卡一卡二卡3卡4卡无卡视频| 天堂/在线中文在线资源官网| 在线视频国产99| 一二三四视频社区在线| 手机看片福利永久国产日韩| 久久天天躁狠狠躁夜夜|