如何使用谷歌地图给国家上色? [英] How to color countries using google maps?

查看:1585
本文介绍了如何使用谷歌地图给国家上色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要根据范围(例如:人口)为世界上的不同国家着色。

 红色:> 1亿美元b $ b绿色:50-99百万美元b $ b Ash:< 5000万美元b $ b  

如何做到这一点。
我的开发环境是Rails3。请帮助


我会附上一张示例图,展示地图应该如何显示

解决方案

使用Google图表API,而不是Google Maps API。它有一个图表类型的地图,可以让你很容易地按国家绘制数据并对它们进行颜色编码,例如,
http://code.google.com/apis/chart/ interactive / docs / gallery / geochart.html#Example

I need to color different countries in the world based on a Range (eg: population)

 Red  :   > 100 million
 Green:   50 - 99 million
 Ash  :   < 50 million

How can this be done. My development environment is Rails3. Please help

I will attach a sample image how the map should look

解决方案

Use Google Charts API, not Google Maps API. It has a chart type of map which will allow you to very easily plot data by country and color-code them, e.g. http://code.google.com/apis/chart/interactive/docs/gallery/geochart.html#Example

这篇关于如何使用谷歌地图给国家上色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆