Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

World map that zooms into country using HTML5

I have been looking at RaphaelJS, D3, and other "mapping" tools (jvectormap, etc) but I could not find any example of a world map that will zoom into a country on mouse click. I want to initially see a world map and then, when you click on a country it will zoom in and just show that country (with the world not showing and you can zoom out to the world at any point). Here is a bad example:

http://htmlpreview.github.com/?https://raw.github.com/escobar5/raphael-pan-zoom/master/examples/complete-map/index.html

Can you point me to an example, preferably in D3, protovis, Raphael, or another popular SVG/CANVAS type library. I will be adding lots of data points (based on geo coords) to these maps.

The closest example to what I need is the d3 map on http://theartofasking.com but I was looking for more examples.

like image 626
Dave Lobby Avatar asked Nov 20 '25 19:11

Dave Lobby


1 Answers

Check out the two examples under D3.js World Map that Zooms into each Country on Click. You should be able to expand on that and build what you need.

like image 95
iwek Avatar answered Nov 23 '25 08:11

iwek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!