<?php /** * Template snippet */ if (function_exists('pronamic_google_maps_mashup')) { pronamic_google_maps_mashup(array('post_type' => 'post', 'nopaging' => true), array('width' => 800, 'height' => 800, 'map_options' => array('styles' => array((object) array('featureType' => 'water', 'stylers' => array((object) array('visibility' => 'on'), (object) array('hue' => '#ff0011'))))))); }
<?php /** * Filter snippet */ function prefix_pronamic_google_maps_marker_options_zindex($z_index) { global $post; $featured = get_post_meta($post->ID, '_custom_key_featured', true); if ($featured) { $z_index = 1000001; } else { $z_index = 1000000; } return $z_index; } add_filter('pronamic_google_maps_marker_options_zIndex', 'prefix_pronamic_google_maps_marker_options_zindex'); /** * Template snippet */ if (function_exists('pronamic_google_maps_mashup')) { pronamic_google_maps_mashup(array('post_type' => array('post_type_a', 'post_type_b'), 'nopaging' => true), array('width' => 800, 'height' => 800, 'map_type_id' => 'satellite', 'marker_options' => array('icon' => 'http://google-maps-icons.googlecode.com/files/photo.png'))); }
<?php /** * Template snippet */ if (function_exists('pronamic_google_maps_mashup')) { pronamic_google_maps_mashup(array('post_type' => 'post', 'nopaging' => true), array('width' => 800, 'height' => 800, 'map_type_id' => 'satellite', 'marker_clusterer_options' => array('gridSize' => 60))); }
<?php /** * Template snippet */ if (function_exists('pronamic_google_maps_mashup')) { pronamic_google_maps_mashup(array('post_type' => 'post', 'nopaging' => true), array('width' => 800, 'height' => 800, 'map_type_id' => 'satellite', 'latitude' => 52, 'longitude' => 8, 'zoom' => 4, 'fit_bounds' => false)); }
<?php /** * Template snippet */ if (function_exists('pronamic_google_maps_mashup')) { // http://codex.wordpress.org/Function_Reference/get_current_user_id $user_id = get_current_user_id(); // http://codex.wordpress.org/Function_Reference/get_user_meta $favorite_villas = get_user_meta($user_id, 'favorite_villas', false); // http://codex.wordpress.org/Function_Reference/WP_Query#Parameters $query = new WP_Query(array('post_type' => 'villa', 'nopaging' => true, 'post__in' => $favorite_villas)); // Mashup pronamic_google_maps_mashup($query, array('width' => 800, 'height' => 800, 'map_type_id' => 'satellite', 'marker_options' => array('icon' => 'http://google-maps-icons.googlecode.com/files/photo.png'))); }