Chris

Forum Replies Created

Viewing 15 posts - 736 through 750 (of 1,120 total)
  • Author
    Posts
  • in reply to: CSS styling problem #12521
    Chris
    Keymaster

      Hi,

      Maps are output in a table that also contains the directions and poi list.  The 2012 theme applies a border to table rows – that’s the line you’re seeing, at least on my site.

      You can find the actual class using Firebug (for Firefox) or IE Developer Tools, then remove it or override it.

      in reply to: Disable non-pro updates #12520
      Chris
      Keymaster

        Hi,

        No not yet.  WordPress doesn’t provide a mechanism for 3rd-party plugins to update so it will have to wait until I can write an update server to replace their functionality.

        in reply to: geocoding #12507
        Chris
        Keymaster

          Hi,

          The map is created and saved in the database so it doesn’t need to be geocoded on each request.  This makes things much faster (geocoding can take 1 sec) and also helps to avoid Google’s per-day geocoding limits.

          You can write the lat/lng values to a custom field by hooking into the ‘save’ action.  I haven’t tested it, but code like this should write the first poi lat/lng to custom fields:

          <?php 
          function myaction($map) {
           global $post;
           $first_poi = isset($map->pois[0]) ? $map->pois[0] : null;
           if ($first_poi) {
             $lat = $poi->point['lat'];
            $lng = $poi->point['lng'];
            update_post_meta($post->ID, 'mylat', $lat);
            update_post_meta($post->ID, 'mylng', $lat);
           }
          }
          add_action('mappress_map_save', 'myaction', 10, 2);
          ?>
          in reply to: Maps & Custom Fields – No Maps Generated #12503
          Chris
          Keymaster

            Hi, I’m glad you got it working.  I don’t know what a ‘wysiwyg’ field is, but it sounds like something from a fields plugin.  Some plugins don’t write the data to WordPress custom fields, which is where it needs to be for MapPress to read it.

            Chris
            Keymaster

              Hi,

              1.  No, the plugin writes the classes, you don’t need to do it

              2.  Probably because of #1

              3.  In the click function

              Are you sure you can’t just use jQuery UI tabs?  It would save you from having to reinvent this code which is already part of the plugin.

              Chris
              Keymaster

                Hi Nick,

                By default mapp0, mapp1, …etc indicate the first map on the screen, second, and so on.  You can use the ‘name’ parameter in the shortcode to name your maps something else.

                You’ll need to call that resize() function for each map inside the tab.

                If you want to future-proof it, you could try searching for class ‘mapp-canvas’.  Any <div> with that class will have as its ID the name of its corresponding map object.  For example this should resize all maps on the screen:

                jQuery(‘.mapp-canvas’).each(function() {
                var id = jQuery(this).attr(‘id’);
                var map = window[id];
                map.resize();
                }

                Chris
                Keymaster

                  I don’t think degrees will work in MapPress.  Are you asking about how to use Google maps?

                  Chris
                  Keymaster

                    Hi,

                    That looks right, I’d say just move the resize below that last line.

                    Chris
                    Keymaster

                      Hi, you should be able to just enter the lat/lng as decimals (not degrees) in the map editor.  You can also drag a POI to the correct location in the map editor if it seems to have picked the wrong spot.

                      in reply to: Mashup in multisite setup #12484
                      Chris
                      Keymaster

                        Hi,

                        Sorry but no, the plugin doesn’t read or combine maps across sites.

                        in reply to: POI pin and polygon want only 1 clickable #12473
                        Chris
                        Keymaster

                          No, I haven’t had a chance to look at it yet.  I’ll let you know when I do.

                          Chris
                          Keymaster

                            Hi,

                            The template’s tabs are using jQuery – but they aren’t using the jQuery UI tabs library.

                            You’ll probably be better off just using the Post UI Tabs version.  But if you or the template author want to edit the existing javascript, the command to ‘redraw’ the map is just as listed in the FAQ:

                            mapp0.resize();

                            You would need to put it inside the click() function in the code you provided.

                             

                            Chris
                            Keymaster

                              Hi,

                              There is no solution or fix other than the workarounds outlined in the FAQ.

                              The browser reports hidden fields as having zero size, and the Maps API then draws only a small corner of the map.  Google’s solution has been to offer a resize event you can trigger when a tab becomes visible.

                              I would suggest using jQuery UI tabs, or a plugin based on that library, in which case I have a workaround built in to MapPress that should work to trigger the resize event.

                              To instead continue using the existing tab control, you’ll need to trigger the map’s resize() method when its containing tab becomes visible.  The ‘tab selected’ event depends on the control (and some don’t make one available at all).

                              in reply to: POI list links anchored to map on page #12461
                              Chris
                              Keymaster

                                Hi,

                                That’s an interesting one, I’m not sure but you might try removing the ‘return false’ – it cancels the normal event handling for the anchor (since normally there is no ‘#’ anchor), so it probably prevents moving the focus to your anchor.

                                Altenatively, you could use jQuery, to explicitly focus the anchor.  For example:

                                mapp0.getPoi(10).open(); jQuery('#myanchor').focus(); return false;

                                By the way, you can also modify the poi list template if you’d prefer to use that instead of the table plugin.  It’s called ‘map_poi_list.php’ and there is some info in the documentation about how to copy it to your theme.

                                in reply to: Blank Map with Pin only-Pro Version #12460
                                Chris
                                Keymaster

                                  Hi Dan,

                                  I’m glad you got it fixed!  The Google Maps API only allows itself to be loaded once, so if the other plugin is loading that API you would need to disable it in order to run both plugins.

                                Viewing 15 posts - 736 through 750 (of 1,120 total)