开发者

Why does google map use Canvas to make distance measurement not SVG?

I use chrome debug tool to compare google map and other maps. I found for the distance measurement function, google map use canvas to draw the path and some others use SVG. I assume that maybe this is because canvas is faster. But SVG have many good parts for drawing the path. Is开发者_StackOverflow中文版 there any other reasons?


Every SVG element is a DOM element and having 10,000+ SVG paths causes a massive slowdown compared to Canvas. So one possibility is the performance of it.

But originally Android did not render/support SVG. That's probably the real reason why Google chose to use Canvas.

Today, Tablet Android (3.0+) has SVG support but 1.0-2.3 do not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜