3

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.

4

4 に答える 4

3

クリックすると各国にズームインするD3.js世界地図の2つの例を確認してください。それを拡張して、必要なものを構築できるはずです。

于 2013-02-22T14:13:45.653 に答える
0

ズームイン/ズームアウトしたJavaScriptマップの別の例を見ることができます

http://www.fla-shop.com/products/html5/world/zoom-world-map/

RaphaelJSを使用しています。

于 2013-02-14T15:16:20.110 に答える
0

I built something similar a little while ago simply with SVG and jQuery. I'm animating the entire map's width and height and moving it's position to fake the effect of zooming. It does the job, works across all browsers and doesn't rely on learning a new Library.

https://igr-inc.com/iGR_Global_Statistics_Services/

This example zooms in on continents but you can go into as much details as possible. Have a look at the source, hopefully it's quite self explanatory but do shout if you have and queries.

于 2013-01-29T17:09:59.610 に答える
0

This map may do what you want with d3, zooming into each country and breaking up each country into first level admin districts (counties / states etc). For the US, which has huge states, it goes one level further and breaks each state into counties.

https://github.com/crittercism/critter-world-map

于 2017-07-10T19:12:08.710 に答える