Requests a resource using JSONP.
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | The URL to request. | ||||||||||||||||
options |
Object |
optional
Object with the following properties:
|
||||||||||||||||
request |
Request | optional The request object. Intended for internal use only. |
Returns:
a promise that will resolve to the requested data when loaded. Returns undefined if
request.throttle
is true and the request does not have high enough priority.
Example:
// load a data asynchronously
Cesium.loadJsonp('some/webservice').then(function(data) {
// use the loaded data
}).otherwise(function(error) {
// an error occurred
});