WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] [Plugin: Pronamic Google Maps] Shortcode for mashup?

[Resolved] [Plugin: Pronamic Google Maps] Shortcode for mashup?

Viewing 8 replies - 1 through 8 (of 8 total)
  • In the next release we will add an [googlemapsmashup] shortcode. W’ll try to launch it this week.

    [googlemapsmashup query="post_tpe=company&nopaging=true" map_type_id="satellite"]

    Thank you for reply. Finally I did it and it works well.

    Btw, I have another question: Tell me please, how to display balloon after click on single post map and how to show the address in the balloon. I need to have the same effect, i did in mashup map: http://zooom.pl/screensnapr/1336408584-04tKxElrI2.jpg

    I did it by adding in Pronamic_Google_Maps_Mashup.php this code:

    function prefix_pgmm_item($itemContent) {
    	$itemContent = '';
    	$itemContent .= '<strong> ';
    	$itemContent .= '	<a href="'. get_permalink() .'">';
    	$itemContent .= '		'. get_the_title();
    	$itemContent .= '	</a>';
    	$itemContent .= '';
    	$itemContent .= '</strong>';
    	$itemContent .= wpautop(get_post_meta(get_the_ID(), '_pronamic_google_maps_address', true));
    	$itemContent .= wpautop(get_post_meta(get_the_ID(), '_pronamic_google_maps_description', true));
    	$itemContent .= '<hr size=1 noshade>';
    	$itemContent .= '	<a href="'. get_permalink() .'"><img src="http://MyUrl/wp-content/themes/Minimal/images/btn-zobacz-szczegoly.png" alt="" title="..." class="aligncenter" />';
    
    	return $itemContent;
    }
    
    add_filter('pronamic_google_maps_mashup_item', 'prefix_pgmm_item');

    How and which files should I change to do the same on single map?

    I did it by adding in Pronamic_Google_Maps_Mashup.php this code:

    You should not adjust plugin files, you can add the code to the functions.php file of your WordPress theme.

    How and which files should I change to do the same on single map?

    The following filter is applied to the description on a single map:

    add_filter('pronamic_google_maps_item_description', 'prefix_pgmm_item');

    Thanks for your support.

    You should not adjust plugin files, you can add the code to the functions.php file of your WordPress theme.

    I know that, but I’m not a coder so I tried a lot of stupid things to make it works 🙂 – now it’s great.

    Btw: I had to add to the mashup file this code:

    { ob_start();
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;}

    Without it, mashup shows on the top of page and not where it should.
    Maybe it’s a good idea to fix this problem with your new update?

    Thanks for the suggestion, that won’t be a problem in our implementation of the mashup shortcode.

    How to show different informations in a single map balloon and different in mashup map balloon?

    How to show different informations in a single map balloon and different in mashup map balloon?

    You can use the following filters for that as described earlier in this topic.

    add_filter('pronamic_google_maps_mashup_item', ...
    add_filter('pronamic_google_maps_item_description', ...

    Thank You! It looks perfect now 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] [Plugin: Pronamic Google Maps] Shortcode for mashup?’ is closed to new replies.
Skip to toolbar