Title: [Plugin: Basic Google Maps Placemarks] Categories feature requests
Last modified: August 20, 2016

---

# [Plugin: Basic Google Maps Placemarks] Categories feature requests

 *  Resolved [frizzle](https://wordpress.org/support/users/frizzle/)
 * (@frizzle)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/)
 * I’ve been trying to use the BGMP categories and running into all sorts of practical
   difficulties. Here are some things I had expected I would be able to do with 
   the categories that I was not able to:
 * 1. Toggle categories on the maps on the fly. I understand this would require 
   changing the way the plugin handles categories, but not being able to do this
   dynamically (that is, with Javascript) makes the categories almost useless. I
   understand they are provided in their current incarnation with the idea that 
   you could use them to create multiple maps for a given site, but I think it’s
   probably much more common to have one map that allows you to filter things on
   and off.
 * 2. Have [bgmp-list] also respond to categories. This seems mandatory no matter
   how you slice it. [bgmp-list] is basically useless if you use categories, because
   it does not filter by them at all. This means that even if you did use the categories
   in the way they were imagined (multiple maps for a single site), you would be
   essentially prohibited from using [bgmp-list] as well, because it can’t be made
   to recognize what category page it is on.
 * One additional feature request unrelated to categories:
 * 3. There should be an easy, plugin-independent way of specifying a new default
   image. At the moment I can do this by dropping in a new default-marker.png into
   my plugin directory, but this gets reset every time the plugin updates. A huge
   pain. There are also the “featured image” designations but setting each and every
   one of these manually is a huge pain when you have lots of placemarks, and all
   you want is a new default.
 * What I’d really love is to be able to call some sort of simple function or set
   a variable in my theme’s functions.php, which would then be checked before a 
   default image was used. That way it would be immune to being broken just because
   I upgraded my plugin.
 * It would also be great if one could set category specific icons in this way, 
   but that’s less mission-critical.
 * Thanks for the work on this. I think it’s aaalllllmost there in terms of a really
   robust WP mapping plugin — these last few thing are all I’d need to be 100% happy.
   🙂
 * [http://wordpress.org/extend/plugins/basic-google-maps-placemarks/](http://wordpress.org/extend/plugins/basic-google-maps-placemarks/)

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/page/2/?output_format=md)

 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400819)
 * 1) This will be a relatively large amount of work, but I realize that a lot of
   people would like it. I’ve added it to the TODO list, but I’m not sure when I’ll
   have time to do it. If you’re interested in submitting a patch I’d be discuss
   that with you and integrate it into the core.
 * 2) This is already on the TODO list for a future release, probably 1.5.3. The
   core category feature was just added in 1.5 and I haven’t had time to complete
   all the related components yet.
 * 3) That’s a good idea. I’ll add a filter on the default image location in 1.5.2
   for that. It’ll come out right around the time that WordPress 3.3 does (probably
   around the end of the month).
 *  [chemboy](https://wordpress.org/support/users/chemboy/)
 * (@chemboy)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400883)
 * i’ve just come across the limitation of the bmp-list when using categories [point
   2] 🙁
 * isn’t there a way of inserting the correct category info in the same way the 
   category filter function works for the maps? wouldn’t it be a similar line of
   code?
 * this would be sooooo useful to me right now! because the map uses cats i assumed
   the list would too
 * coders out there, get to it!
 *  [Stefano De Prophetis](https://wordpress.org/support/users/steo83/)
 * (@steo83)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400907)
 * I think a default icon for each category, and an easy way to filter the category
   from the map, would be two great and very useful upgrades.
 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400913)
 * Version 1.6 has a filter that lets you change the default icon. See the FAQ for
   details on using it.
 *  [aslanov](https://wordpress.org/support/users/aslanov/)
 * (@aslanov)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400934)
 * Hi Ian,
 * I am using 1.6 but couldn’t find any filter option. I want to show map with multiple
   categories and able to filtering. is it possible?
 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400935)
 * aslanov, check the ‘Can I change the default marker icon?’ entry in the FAQ. 
   It’s not an option that you change in the WordPress Admin Panel, but something
   code that you can put in your theme.
 *  [Dademaru](https://wordpress.org/support/users/xendo/)
 * (@xendo)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400945)
 * Hi Ian,
    any news about point 1 and 2 of Frizzle post? We really need these features
   and would like to keep using your plugin.
 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400946)
 * #2 will probably be in v1.8. I don’t have any plans for #1 yet, but a lot of 
   people have asked for it, so I may consider it in the future.
 *  [Dademaru](https://wordpress.org/support/users/xendo/)
 * (@xendo)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400951)
 * Hi Ian,
    when will be released v.1.8? It’s essential to filter placemarks by 
   category, otherwise this plugin it’s useless. Meanwhile I’m trying to query placemarks
   by category with this code:
 *     ```
       <?php
       query_posts( array(
       'post_type' => 'placemarks',
       'posts_per_page' => 10,
       'orderby' => 'title',
       'order' => 'ASC',
       'category-slug' => 'europe'
       ) );
       ?>
       ```
   
 * It doesn’t work…
    I’ve tried with post_type Placemark, Placemarks, placemark 
   and Placemarks but I don’t get any post on the page. It’s quite weird ’cause 
   with every other post type this works. Could you help me? Thanks
 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400952)
 * Version 1.7 will probably be out in about a month, and 1.8 another 1-2 months
   after that.
 * At least one reason why that code isn’t working is that you’re using the wrong`
   post_type`. It should be ‘bgmp’.
 * You probably won’t be able to use `category_slug` either, since it’s a custom
   taxonomy. You should look at the [tax_query](http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters)
   argument. The category slug is `bgmp-category`.
 *  [Dademaru](https://wordpress.org/support/users/xendo/)
 * (@xendo)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400953)
 * Thanks Ian,
    now it works, so I share the code if someone else need it.
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Now I have different pages, each with its own map and its own placemarks list.
   
   It would be great to set different parameters in the [bgmp-map] shortcode, such
   as zoom level and map center. Another big feature to make this plugin the best
   one for its kind is to have links in [bgmp-list] open repsective info on map (
   I’ve seen it’s in your to-do), in the same page. I look forward for your updates,
   meanwhile thanks 😉
 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400954)
 * [bgmp-map] shortcodes is in the list for 1.7.
 * The mods removed the code you pasted because it was too long. Could you put it
   in a Pastebin and add the link here?
 *  [Dademaru](https://wordpress.org/support/users/xendo/)
 * (@xendo)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400955)
 * Here’s the code splitted in two part 😉
 *     ```
       <?php
       $region = get_post_meta($post->ID, 'my_region', true);
       query_posts( array(
          	'post_type' => 'bgmp',
          	'posts_per_page' => -1,
          	'orderby' => 'title',
          	'order' => 'ASC',
          	'bgmp-category' => $region
       ) );
       ?>
       ```
   
 * and
 *     ```
       <?php if ( have_posts() ) : while ( have_posts() ) : the_post();  $address = get_post_meta($post->ID, 'bgmp_address', true );?>
       <li class="list-item">
           	<h3 class="list-placemark-title"><?php the_title(); ?></h3>
           	<div class="list-description"><?php the_content(); ?></div>
           	<p class="list-link"><a href="http://google.com/maps?q=<?php echo($address) ?>" target="_blank">Map</a></p>
       </li>
       <?php endwhile; endif; ?>
       ```
   
 * hope it works 😉
 *  [aby87](https://wordpress.org/support/users/aby87/)
 * (@aby87)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400957)
 * Hi Ian,
 * Can you give me an example of what condition I need to make to set the default
   placemark by which category the placemark is in?
 * if( $placemarkID == 354 )
 * Regards,
 * Aby87
 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/#post-2400958)
 * aby87, try something like:
 *     ```
       function setBGMPDefaultIcon( $iconURL, $placemarkID )
       {
       	$placemarkCategories = wp_get_object_terms( $placemarkID, 'bgmp-category' );
   
       	foreach( $placemarkCategories as $pc )
       		if( $pc->slug == 'restaurants' )
       			$iconURL = get_bloginfo( 'stylesheet_directory' ) . '/images/bgmp-default-icon.png';
   
           return $iconURL;
       }
       add_filter( 'bgmp_default-icon', 'setBGMPDefaultIcon', 10, 2 );
       ```
   
 * I haven’t tested that, so you may need to play around with it a bit, but that’d
   be the general idea.

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/page/2/?output_format=md)

The topic ‘[Plugin: Basic Google Maps Placemarks] Categories feature requests’ is
closed to new replies.

 * ![](https://ps.w.org/basic-google-maps-placemarks/assets/icon-128x128.png?rev
   =1152531)
 * [Basic Google Maps Placemarks](https://wordpress.org/plugins/basic-google-maps-placemarks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/basic-google-maps-placemarks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/basic-google-maps-placemarks/)
 * [Active Topics](https://wordpress.org/support/plugin/basic-google-maps-placemarks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/basic-google-maps-placemarks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/basic-google-maps-placemarks/reviews/)

 * 20 replies
 * 7 participants
 * Last reply from: [chemboy](https://wordpress.org/support/users/chemboy/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-categories-feature-requests/page/2/#post-2400972)
 * Status: resolved