Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Canvas or SVG world map [closed]

I'm searching for open source implementation of world map for HTML5 Canvas or any JS library. I need simple vector world map with landscape and zoom. It would be good if it works on iOS/Android/BB OS.

http://cartagen.org/ too redundant for me.

like image 508
Alexander Gryanko Avatar asked May 24 '11 00:05

Alexander Gryanko


People also ask

Is SVG better than canvas?

SVG gives better performance with smaller number of objects or larger surface. Canvas gives better performance with smaller surface or larger number of objects. SVG is vector based and composed of shapes. Canvas is raster based and composed of pixel.

Is HTML5 canvas still used?

The HTML5 canvas has the potential to become a staple of the web, enjoying ubiquitous browser and platform support in addition to widespread webpage support, as nearly 90% of websites have ported to HTML5.

What is the difference between SVG and HTML5 canvas?

Difference between SVG and HTML5 Canvas: Canvas has poor scalability. Hence it is not suitable for printing on higher resolution. SVG gives better performance with smaller number of objects or larger surface. Canvas gives better performance with smaller surface or larger number of objects.

Can we use SVG inside canvas?

To draw SVG onto canvas, you need to use SVG image. Firstly, use the <foreignObject> element which contains the HTML. After that, you need to draw the SVG image into the canvas.


1 Answers

SVG would probably be easier to implement. I would look in to Raphael JS

Here is a relevant example of what raphael JS can do and how little code it takes

SVG world map definitions can be found numerous places, including Wikipedia, they shouldn't be too hard to search for.

like image 53
Simon Sarris Avatar answered Sep 24 '22 17:09

Simon Sarris