我有以下的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