WordPress.org

Ready to get started?Download WordPress

Forums

Pronamic Google Maps
[resolved] Mashup map only showing last 4 entries for custom post type (5 posts)

  1. Long Beach Web Design
    Member
    Posted 1 year ago #

    I have a Mashup map set for a custom post type but the map will only show the last 4 entries. Here is the code I use in my page template:

    <?php
    
    if ( function_exists( 'pronamic_google_maps_mashup' ) ) {
        pronamic_google_maps_mashup(
            array(
                'post_type' => 'restaurant-week'
            ),
            array(
                'width'          => 660,
                'height'         => 400,
                'map_type_id'    => 'roadmap',
    						'zoom' 					=>  10,
                'marker_options' => array(
                    'icon' => 'http://www.REMOVED FOR THIS POST/images/restaurant_icon.png'
                )
            )
        );
    }
    
    ?>

    Has anyone else had this issue? I am using wp-types plugin to create custom post types.

    http://wordpress.org/extend/plugins/pronamic-google-maps/

  2. Long Beach Web Design
    Member
    Posted 1 year ago #

    HAHAH, should have looked just 1 minute longer through the forum. I found the answer in another post. If anyone has this question try adding:
    'nopaging' => true
    in the post_type array. Im not sure why there would be paging on a map though, any insight on this?

  3. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

    I agree, most of the time an pagination limit is not needed on an map mashup. I'm however not sure setting the 'nopaging' parameter by default to true is an good idea.

  4. Long Beach Web Design
    Member
    Posted 1 year ago #

    Yes, I can see why you would want it on in certain cases. What controls the limit of the paging? I like this plugin but as a developer I find the documentation a little lacking. If the 'nopaging' => true was in the "Installation" part along with all the other optional parameters I think that would be quite helpful for the users of this plugin instead of having to search the support forum for the answers. Just a thought! Keep up the great work!

  5. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

    Luckily most WordPress developers are familiar with the WordPress query parameters (http://codex.wordpress.org/Class_Reference/WP_Query#Parameters) and know when to use them. I adjusted one of the examples in the readme.txt file:

    https://github.com/pronamic/wp-pronamic-google-maps/commit/46cb8afd53e27e6dc2998a19f3f5b5684ae5c6ed

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.