How would I go about creating an interactive map u

2019-09-16 02:36发布

问题:

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.

See http://us.fulbrightonline.org/countries/selectedregion/23 to get an idea of what I mean.

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.

回答1:

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

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/