Maps made easy

Map examples

All map examples were generated with our plugin. Most examples can be imported directly to your plugin. A download button can be found at the end of each example page.

Use Other Shortcodes With Your Map

[this_can_be_a_shortcode_for_berlin]
[this_can_be_a_shortcode_for_omaha]

If you want to use other shortcodes with your map, you can’t insert them directly in the click value. You will have to insert them on the same page where you use the map shortcode. You have to wrap your shortcodes in container and hide/show the correct container when the user clicks on your map. In the example above we used the following construction:

Changes on your page/post (not within the plugin):

Open a page or post where you want to use your map. We wrapped the shortcodes in the following HTML tags:

<div class="shortcodes-and-map">
	<!-- Container for the map -->
	<div class="map">
		[interactive_map id="113"]
	</div>
	
	<!-- Container for all shortcodes -->
	<div class="shortcodes">
		<div class="shortcode_berlin visible">
			[this_can_be_a_shortcode_for_berlin]
		</div>
		<div class="shortcode_omaha">
			[this_can_be_a_shortcode_for_omaha]
		</div>
	</div>
</div>

<style>
	.shortcodes-and-map .shortcodes > div {
		display: none;
	}
	.shortcodes-and-map .shortcodes .visible {
		display: block;
	}
</style>

Please note that you have to replace the id in the map shortcode. Also note that the last part of the code contains CSS that controls the visibility of the container. If you use tools like Visual Composer, you can click on the gear symbol to insert the CSS there and remove the part from the above HTML.

If you preview the HTML and CSS from above on your page or post, you should see that the first shortcode is visible and the second is hidden. You can easily extend the the construction by any number of shortcodes.

Changes on your map:

The last step is to create a small script that hides all container and shows the correct one. Open your map in the map builder. Then click on “Map Template”. In the template box you can insert the following code to the JavaScript section:

var cont = jQuery("#" + cssid).parents(".shortcodes-and-map");
var divs = cont.find(".shortcodes > div");
divs.removeClass("visible");
divs.filter("." + click_value).addClass("visible");

The lines do the following:

  1. This finds the container that wraps all of our HTML.
  2. This finds all container for our shortcodes.
  3. This removes the visible class from all shortcode container.
  4. In the last step we have to find the correct container that should become visible. The click value contains the class of the container that we want to show.

For example, for the Berlin marker we would use the following click value “shortcode_berlin”. If you create your map now, you won’t have to touch the code anymore. You only have to take care of the container and the correct classes in the click values.

It is also possible to show the same shortcode for more than one marker. In this case you simply have to use the same click value.

If you have problems while creating this on your site, let us know and we will try to help you.

The configuration of the map can be found here:

Name Value Description
Region World List with all available regions
Width auto Width of the map in pixel. 'Auto' means that the map is centered in the available width.
Height auto Height of the map in pixel. 'Auto' means that the map is centered in the available height.
Display mode Markers Specifies the display mode of the map.
Border resolution Countries The resolution of the map borders.
Tooltips On Allows to display a tooltip for highlighted map elements.
Tooltips: Trigger focus The user interaction that causes the tooltip to be displayed.
Tooltips: Use HTML On Specifies if the tooltips should use HTML. This allows to customize the tooltips even more. For example, if this property is on, it is possible to display images wihtin the tooltip.
CSS
#{cssid} circle {
 cursor: pointer;
}
HTML
<div id="{cssid}">
  %%map%%
</div>

JavaScript

Executed when a marker/region is clicked.

Click value can be defined for each map element.

var cont   = jQuery("#" + cssid).parents(".shortcodes-and-map");
var divs = cont.find(".shortcodes > div");
divs.removeClass("visible");
divs.filter("." + click_value).addClass("visible");
Color Name Click Value
Berlin shortcode_berlin
Omaha shortcode_omaha

Comments

If you need help or have questions, please leave a comment.


Search

Responsive? Yes!

Our maps are fully responsive. They automatically fit into the available width. Try it by resizing your browser window.

Did you know…

  • All examples are importable to your plugin.
  • We extend our set of examples from time to time. If you think there is an example missing, write us a message and we will try to add it!

User reviews

  • Best map-plugin I could find.
  • Great support. Real fast response. This was exactly what I needed. Very flexible and useful.
  • Was waiting for plugin like this for ages! Customer support is also great.
  • Customer support is excellent and very quick. I have no hesitation in recommending this product.

Example for a sidebar map


All maps can also easily be added to your sidebar.