我有以下的javascript代碼塊,而且也不是很清楚的:請解釋這行js代碼。
var level = this.getLevelForResolution(this.map.getResolution());
var coef = 360/Math.pow(2, level);
var x_num = this.topTileFromX < this.topTileToX ? Math.round((bounds.left - this.topTileFromX)/coef) : Math.round((this.topTileFromX - bounds.right)/coef);
var y_num = this.topTileFromY < this.topTileToY ? Math.round((bounds.bottom - this.topTileFromY)/coef) : Math.round((this.topTileFromY - bounds.top)/coef);
是什麼在this.topTileFromX <
的<
是什麼意思?
「<」是小於三元運算符條件的符號。除此之外,這個問題不是很清楚。 – 2013-03-08 06:15:18
@TimMedora,我認爲他用英語表達有困難。我編輯了這個問題,使其更加清晰。 – saji89 2013-03-08 06:29:02
謝謝。我的語言不是英語 – user1279988 2013-03-08 06:41:16