Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some tweaks for TileLayer performance #2516

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

deyihu
Copy link
Collaborator

@deyihu deyihu commented Mar 13, 2025

fix #2515

@deyihu deyihu requested a review from fuzhenn March 13, 2025 02:25
const terrainTileMode = layer._isPyramidMode() && layer.options['terrainTileMode'];
let tileGrids = layer.getTiles();
this._frameTileGrids = tileGrids;
tileGrids = tileGrids.tileGrids;
if (!tileGrids || !tileGrids.length) {
layer._tempSr = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layer._tempSrthis._tempMap可以改名为 layer._spatialRef 和 this.map
因为虽然目的是为了临时设置变量,以减少函数调用,但这两个变量实际上并不是临时的,而确实是他们所拥有的空间参考和所属的map,也不是临时用完就没用了的,在含义上还叫temp并不准确。

@deyihu deyihu requested a review from fuzhenn March 21, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

some tweaks for TileLayer performance
2 participants