如何在Wordpress中使用Google API来创建交互式地图? [英] How would I go about creating an interactive map using google's API in Wordpress?

查看:165
本文介绍了如何在Wordpress中使用Google API来创建交互式地图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一个朋友在Wordpress网站上工作,希望将日历放在页面上,当鼠标滚动到某个国家时,该国家会亮起并显示一些信息,并为用户提供一些选项,下载有关该国家的pdf文件.

I'm working on a Wordpress website for a friend and want to put a calendar on a page that when the mouse scrolls over a country for the country to light up and display some information as well as give the user some options to download a pdf about that country.

请参见 http://us.fulbrightonline.org/countries/selectedregion/23 了解我的意思.

仅需要了解实现此类工作所需的技术和工具即可.我知道我将需要使用API​​,但是将鼠标悬停并附加到每个国家/地区pdf对我来说是新的.

Just need to get a sense of what technologies and tools are needed to make something like this work. I know I will need to utilize an API but the hovering and attaching a pdf to each country is new to me.

推荐答案

您可以尝试使用Google Geochart API解决您的问题.它允许创建交互式地图并捕获单击事件.它还允许为国家单独上色并显示工具提示.您可以在此处找到更多信息和示例: https://developers.google.com/chart/interactive/docs/gallery/geochart

You could try to use the Google Geochart API for your problem. It allows to create interactive maps and to capture click events. It also allows to color countries individually and to display tooltips. You can find more information and examples here: https://developers.google.com/chart/interactive/docs/gallery/geochart

我为使用此API的WordPress创建了一个插件.它集成了所有需要的脚本,并允许从管理面板构建地图.您可以在这里找到更多信息: http://meisterpixel.com/interactive-map-builder/

I created a plugin for WordPress that uses this API. It integrates all the needed scripts and allows to build a map from the admin panel. You can find more information here: http://meisterpixel.com/interactive-map-builder/

这篇关于如何在Wordpress中使用Google API来创建交互式地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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