Chris

Forum Replies Created

Viewing 15 posts - 586 through 600 (of 1,120 total)
  • Author
    Posts
  • in reply to: Mashup map displays every POI from a single map #13736
    Chris
    Keymaster

      Hi,

      The license prohibits reselling the code but if you’d like to share add-on code with each other feel free – please email each other directly rather than posting here.

      I have a lot on my development list already so I don’t yet have plans to limit searching to only the first POI from a map (other than the filter I mentioned).

      I don’t know if it will work for you, but one workaround is to just use two different posts:

      Post A – the main post. Create a map with a single main searchable location here.
      Post B – a second post. Create the full map with all locations here.

      In Post A, add a shortcode to display the map from Post B using [mappress mapid=123]. When users view Post A, they will then see the full map. But for searches, only the single location that is actually attached to Post A will appear.

      Post B can be excluded from queries by assigning it to a custom post type, different category, etc.

      in reply to: How to change font color of directions #13733
      Chris
      Keymaster

        Hi,

        Sorry, I thought you meant the directions form. The step-by-step route for the directions is generated and styled by Google.

        MapPress does wrap the step-by-step in a div with class “mapp-dir-renderer”, though, so this may do what you want:

        .mapp-dir-renderer {
          background-color: black !important;
          color: white !important;
        }

        It might be easier to just make the directions background white (as Google was assuming it would be) so the text shows up:

        .mapp-dir-renderer {
          background-color: white;
        }

        If you find that you need to style individual parts of the directions, Google uses classes that begin with “adp” (“adp”, “adp-list”, “adp-fullwidth”, etc.). You can use Firebug or IE Developer tools to see how they’re being set.

        in reply to: How to change font color of directions #13724
        Chris
        Keymaster

          Hi,

          The directions CSS is under the class .mapp-directions. So this should work if you add it to your styles.css:

          .mapp-directions {
            color : white;
          }

          Depending on the theme, you may need to add an !important modifier or a more precise selector. You can check the CSS that is actually being applied using Firebug or IE F12 developer tools.

          in reply to: Mashup map link to pages with maps #13723
          Chris
          Keymaster

            Hi, that’s not possible with the plugin, it always shows all POIs for a post.

            One thing you can do is create a new post “B” just to contain the POIs that you *don’t* want linked to the original post.

            You can still display the map from post “B” in post “A”. But it wouldn’t be linked to post “A” and you could exclude it from the query.

            in reply to: Upgrade to MapPress Pro #13711
            Chris
            Keymaster

              Hi,

              Yes, the two versions are compatible.

              in reply to: Mashup with Tax Query #13709
              Chris
              Keymaster

                There is no way to substitute variables (like $parentID) in a shortcode entered in the WordPress post editor.

                If you use PHP, another way to create the map is to use the do_shortcode() command.

                Assuming that $parentID is the slug for a term in the ‘area’ taxonomy you could write:

                $query = “post_type=location&posts_per_page=-1&area=” . $parentID;
                do_shortcode(‘[mashup query="' . $query . '"]‘);

                There are some other query string examples for custom taxonomies in the plugin documentation.

                in reply to: Mashup with Tax Query #13699
                Chris
                Keymaster

                  Hi,

                  You can include your query in the map, for example:

                  
                  $query = array (
                   'post_type' => 'location',
                   'posts_per_page' => -1,
                   'tax_query' => array(
                   array(
                   'taxonomy' => 'area',
                   'field' => 'term_id',
                   'terms' => $parentID
                   ))
                  );
                  
                  $map = new Mappress_Map();
                  $map->query = $query;
                  $map->display(array('width' => 800, 'height' => 800));
                  
                  in reply to: Using existing POI from Google #13693
                  Chris
                  Keymaster

                    No, MapPress doesn’t pick up Google Places, only street addresses, so it’s not possible to copy the Google info.

                    However – if you want to show just the MapPress data, it *is* possible to switch off all or some of the Google placemarks by using a styled map. See the documentation for more info on styled maps.

                    in reply to: Mashup map #13662
                    Chris
                    Keymaster

                      The second map at that link seems to have no height. I think that’s why it’s not displaying.

                      In your shortcode, try adding a height, for example:

                      [mappress width="100%" height="300px"]

                      in reply to: Shortcode in bubble #13643
                      Chris
                      Keymaster

                        @Robbie, it’s better to start a separate thread for your issue. But to answer your question, try this if your custom field is ‘street_address’:

                        <?php 
                          if ($poi->postid)
                            echo get_post_meta($poi->postid, 'street_address', true); 
                        ?>
                        in reply to: Map is empty after migrating entire WP site #13638
                        Chris
                        Keymaster

                          Hi,

                          The plugin doesn’t support copying.

                          You can copy the database tables (which I think you did?). But the data is stored as serialized strings, which include both the string length and the string itself. If you do a search & replace on the URLs it’ll corrupt the data.

                          I think there are some ‘safe search and replace’ plugins that can be used to address this and safely replace the URLs in serialized data.

                          Here’s a link to one of them:

                          http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

                          in reply to: project mashup #13632
                          Chris
                          Keymaster

                            Hi,

                            I’m guessing a ‘project’ is a custom taxonomy. If so, there’s a section in the documentation about queries using custom taxonomies:

                            http://mappresspro.com/mappress-documentation

                            in reply to: Shortcode in bubble #13631
                            Chris
                            Keymaster

                              You can modify the template file map_poi.php to show whatever you like. Try using do_shortcode() to execute any shortcodes in the poi body. I think this would work:

                              <div class='mapp-body'>
                              <?php echo $poi->get_thumbnail(array('class' => 'mapp-thumb')); ?>
                              <?php echo do_shortcode($poi->get_body()); ?>
                              </div>

                              This may not work for all shortcodes (such as those that need to load javascripts on the page).

                              in reply to: Shortcode to Manually Set Mashup Map Type #13602
                              Chris
                              Keymaster

                                I’m glad you figured it out!

                                Custom taxonomies (like ‘portcat’) don’t work with ‘category__in’ because it only applies to the standard ‘category’ taxonomy.

                                in reply to: Shortcode to Manually Set Mashup Map Type #13600
                                Chris
                                Keymaster

                                  No, there’s no limitation. I think the problem is that the ‘in’ parameters in WordPress need *two* underscores.

                                  Try this (with the double underscore):
                                  [mashup query="post_type=port&category__in=40"]

                                  There are a few examples in the documentation, and here:
                                  http://codex.wordpress.org/Class_Reference/WP_Query

                                Viewing 15 posts - 586 through 600 (of 1,120 total)