开发者

Is it possible to load a Google Map into a div and then overlay a canvas element over it?

I know that you can load an image directly in a canvas with drawImage(), but I'm wondering if it is possible to overlay a canvas over another div with images in it.

Specifically, I want to overlay a <canvas> element ove开发者_JAVA百科r a Google map. I'd like to draw polylines and do animations over the map in the <canvas> context instead of using the Google Map APIs for this purpose.


Yes. It should work just fine. Simply have your canvas be positioned over the div, similar to how the multiple canvases are positioned over each other in the example you linked.

You could probably just have tried it and not had to wait for an answer on SO :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜