Skip to content

Commit

Permalink
Remove use of curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
Kogis IWI committed Aug 3, 2017
1 parent b0eb4a1 commit 64ff4fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Source/Scene/UrlTemplateImageryProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ define([
* });
* // Using custom tags in your template url.
* var custom = new Cesium.UrlTemplateImageryProvider({
* url : 'https://yoururl/{time}/{z}/{y}/{x}.png',
* url : 'https://yoururl/{Time}/{z}/{y}/{x}.png',
* customTags : {
* '{time}': function(imageryProvider, x, y , level) {
* Time: function(imageryProvider, x, y , level) {
* return '20171231'
* }
* }
Expand Down Expand Up @@ -581,8 +581,9 @@ define([
if (properties.customTags) {
for (var tag in properties.customTags) {
if (properties.customTags.hasOwnProperty(tag)) {
tags[tag] = properties.customTags[tag]; //eslint-disable-line no-use-before-define
pickFeaturesTags[tag] = properties.customTags[tag]; //eslint-disable-line no-use-before-define
var targetTag = '{' + tag + '}';
tags[targetTag] = properties.customTags[tag]; //eslint-disable-line no-use-before-define
pickFeaturesTags[targetTag] = properties.customTags[tag]; //eslint-disable-line no-use-before-define
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions Specs/Scene/UrlTemplateImageryProviderSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,14 +640,14 @@ defineSuite([
tilingScheme: new GeographicTilingScheme(),
maximumLevel: 6,
customTags: {
'{custom1}': function() { return 'foo';},
'{custom2}': function() { return 'bar';}
custom1: function() { return 'foo';},
custom2: function() { return 'bar';}
}
});

return pollToPromise(function() {
return provider.ready;
}).then(function() {console.error('spyon');
}).then(function() {
spyOn(loadImage, 'createImage').and.callFake(function(url, crossOrigin, deferred) {
expect(url).toEqual('made/up/tms/server/foo/bar/2/1/3.PNG');

Expand Down

0 comments on commit 64ff4fa

Please sign in to comment.