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

查看:221
本文介绍了我将如何使用Wordpress中的谷歌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中的谷歌API创建交互式地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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