[WooVina Elementor Widgets] Add my Own Google Maps Style

You can see some Google Maps styles in the Google Map widget of WooVina Elementor Widgets, you can also add your own styles in two steps:

1. Create your Map Style File

In your child theme, create a assets folder, in this folder, create a js folder, and in this folder create another folder named google-map-styles, so the path would be like this assets/js/google-map-styles/.

Now, in the google-map-styles folder, create a json file with the name of your style, for example, if my style name is Paper, my file name would be paper.json. Then, open your json file in your text editor and paste the json code of your map style, you can copy many styles here: snazzymaps.com.

2. Call your Custom Map Style

Open the functions.php file of your child theme in your text editor to call your map style, you can call more than one style like below:

function prefix_map_styles($styles) {
	$styles['paper'] = 'Paper';
	$styles['midnight-commander'] = 'Midnight Commander';
	return $styles;
}
add_filter('wew_map_styles', 'prefix_map_styles');

That it, your map style will be automatically taken into account in the Style setting of the Google Map widget.


Print   Email