Hide neighbouring countries in markers mode

Italia II - Base for Markers Placeholder
Italia II - Base for Markers
Italy Markers Placeholder
Italy Markers

The maps are generated using the Google Geochart API, which instead of displaying just the country selected, it focus the view on the country location (with the exception of the US map) and often the neighbouring countries are also visible. Another limitation is that it doesn’t allow us to use markers mode and regions mode on the same map. However with some workarounds we can achieve the same effect.

Using the ‘overlay markers on region map‘ technique, we can have a markers map with the neighbouring countries invisible.

Basically we’ll need to create 2 maps. One for the makers and another regions map to serve as the base for it. Then we use the syntax:

show-map id='' overlay=''

Where id will be the regions map (example below) and the overlay will be your markers map.

Here’s a screenshot of the base map used. We added data for all regions, but you can use the map country without being divided by regions, so you only need to add one line of data. Notice the background colour and inactive regions colour was set to transparent. This is what will hide the neighbouring countries, that will have no data.

administration screenshot