Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 there any other reasons?

like image 912
cnzhenyu Avatar asked Sep 27 '11 09:09

cnzhenyu


People also ask

Is Google maps a canvas?

Instructors can add the Google Maps App to their Canvas course site. Once added, Google maps can be embedded into any Canvas text box.

What is MAP Optimisation?

Google Maps Optimization is one of the key strategies of SEO (Search Engine Optimization). It involves changing or arranging the entrance of Google Map so that the business website receives more web traffic.


Video Answer


1 Answers

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.

like image 63
Simon Sarris Avatar answered Nov 15 '22 00:11

Simon Sarris