Chris

Forum Replies Created

Viewing 15 posts - 376 through 390 (of 1,120 total)
  • Author
    Posts
  • Chris
    Keymaster

      Hi

      No, the plugin uses the custom fields as they were saved. I looked through the WP code and there aren’t any actions or filters to use when reading custom field data.

      One solution might be to use these hooks to strip the tags when the custom fields are saved, or you could use them to save the stripped data to a new field:

      add_{$meta_type}_meta
      update_{$meta_type}_meta

      There is some more info here and in the WordPRess codex:
      https://developer.wordpress.org/reference/hooks/add_meta_type_meta/

      Chris
      Keymaster

        Hi,

        The problem is that the plugin only sets $poi->postid for mashups. For individual maps you’ll need to take the current post ID from the global $post.

        I’d like to to get this fixed, since it’s inconsistent – but until then you can use something like this:

        
        <?php global $post; ?>
        <?php $postid = ($poi->postid) ? $poi->postid : $post->ID; ?>
        <div><?php echo get_the_post_thumbnail($postid); ?></div>
        <strong>Grid Reference:</strong> <?php echo get_post_meta($postid, 'wpcf-grid_reference', true); ?><br>
        <strong>Recorder's Name:</strong> <?php echo get_post_meta($postid, 'recorder_name', true); ?><br>
        <strong>Sighting Date:</strong> <?php echo get_post_meta($postid, 'sighting_date', true); ?><br>
        
        in reply to: Mashups and custom post type archvies #15931
        Chris
        Keymaster

          Hi,

          If the posts are all assigned to a specific category/tag the easiest way to do this is to use a mashup for that category/tag with posts_per_page=-1. There are some examples in the documentation:
          http://mappresspro.com/mappress-documentation

          If you don’t know the category/tag being in advance I’ve recently added a way to include the URL request variables in a query. Just prefix the variable with ‘@’. For example, to show all posts in the current category use:

          [mashup query="cat=@cat&posts_per_page=-1"]

          I hope that helps!

          in reply to: error with is_tax() mashup, 2.43.1 pro #15927
          Chris
          Keymaster

            For anyone else with this issue – it’s fixed in 2.43.2.

            in reply to: Missing toolbar in map creator. #15917
            Chris
            Keymaster

              Hi,

              This should now be fixed in version 2.43.1. You can download the update from your account.

              Thanks!

              in reply to: Missing toolbar in map creator. #15910
              Chris
              Keymaster

                Hi,

                Thanks for reporting this, I think it’s a bug. I’ll look into the code and post here when it’s fixed.

                Chris
                Keymaster

                  Hi Tom,

                  When you use a query, the map POIs are read from the database and any POIs specified statically are ignored, that’s probably why you’re not seeing the additional marker.

                  One approach that may work is to modify the POIs before they’re sent back to the map. You can use filter ‘mappress_map_display’ for that purpose – it’s passed each map just before the map is displayed, so you could probably add a POI there. I haven’t tested this, but here’s how it might look in functions.php:

                  
                  function mypoi($map) {
                    $map->pois[] = new Mappress_Poi(array(“iconid” => “green-dot”, “title” => “My Location”, “point” => array(“lat” => $_SESSION[‘lat’], “lng” => $_SESSION[‘long’])));
                  }
                  add_action('mappress_map_display', 'mypoi');
                  

                  Alternatively, you could use javascript to get a handle to the map and add a marker to it. For example if the map is named ‘mapp0’ (the default name for this 1st map, you can override it in the shortcode) the javascript would be:

                    
                  var gmap = mapp0.getMap();
                  var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
                  var marker = new google.maps.Marker({
                        position: myLatlng,
                        map: gmap,
                        title: 'Hello World!'
                  });
                  
                  in reply to: Maps not working on SURFACE Windows 8.1 #15889
                  Chris
                  Keymaster

                    Hi,

                    I’m a little confused – are the maps working in IE on the Surface now, or only in Chrome?

                    If they’re working in IE, what did you install or change to make that happen?

                    in reply to: Maps not working on SURFACE Windows 8.1 #15885
                    Chris
                    Keymaster

                      Hi,

                      I’m not aware of any conflicts on the Surface, although I don’t have one to test with.

                      What exactly isn’t working – can you explain or send a screenshot? What browser and browser version are you using?

                      In general, most issues are caused by conflicts from other plugins & themes, so as a first step, please temporarily deactivate ALL other plugins and switch to a standard theme (like 2015). If the map works with everything deactivated, you can reactivate one by one to find the conflict.

                      in reply to: How is auto map zoom determined? #15877
                      Chris
                      Keymaster

                        Hi Tony,

                        The zoom is calculated automatically by Google using their ‘fitBounds()’ function. That function tries to set the maximum zoom that will still show the region in question. The zoom is based on the rectangular bounds of the region to be shown and the size of the map container.

                        Given the same map size, a very small bounds (like a single street) will zoom in close, while a large one (like a country) will zoom further out. I think in your case Pattaya is probably a little smaller than Bangkok.

                        There’s one other case as well: for a map of locations without defined bounds, such as a single street address, the default POI Zoom is used from the MapPress settings – but that’s not the case in your examples.

                        in reply to: Automatic Maps and Titles #15874
                        Chris
                        Keymaster

                          Hi,

                          You can display the POST title instead of the POI title by setting the ‘mashup poi title’ setting on the MapPress settings screen, or by using the mashupTitle=”post” in the mashup shortcode.

                          Search for ‘poi title’ here to see the details:
                          http://mappresspro.com/mappress-documentation

                          in reply to: Map From External DB? #15865
                          Chris
                          Keymaster

                            Hi Kelly,

                            I don’t think there’s an easy way to do that. I assume you want to show a mashup from the POIs in the other database?

                            If you just want to show a map (or mashup) from site #2, then you could perhaps use an iframe. Embed an iframe in a page on site #1 with its source pointing to a post/page in site #2. In site #2 use a post template that doesn’t have a header/footer/sidebar, to show just the map.

                            in reply to: Addresses are not showing up correctly. #15863
                            Chris
                            Keymaster

                              Hi,

                              MapPress uses Google’s geocoding database, which only accepts street addresses. Google Maps (and embedded Google Maps) also search a separate database called ‘places’ for business listings.

                              In the places database, the address is entered by the business owner and may not be a valid street addresses (or at least not valid to Google).

                              I tried the address you provided and it is invalid per Google’s geocoder.

                              What address did you enter manually to fix it?

                              I don’t know if there’s an easy workaround for this. Hopefully it doesn’t occur too often in your data. Otherwise, I can look into having MapPress call the places database – but that may not be ready in time for your project and would be subject to various usage restrictions from Google:
                              https://developers.google.com/places/webservice/usage

                              in reply to: Marker size #15804
                              Chris
                              Keymaster

                                Hi,

                                I’ve just released version 2.43, which has a setting “icon scaling” intended for this purpose. For example if the large icon is 64×64, you can scale it to 32×32 on non-retina displays using that setting.

                                Please give a try and let me know how it works for you.

                                in reply to: kml overlay in mashup map? #15766
                                Chris
                                Keymaster

                                  Hi Jim,

                                  The plugin does support KML overlays. Just create a single map with one or more KML files as described in the docs, then you can use that map in a mashup as you normally would.

                                  How many KML files are you planning to show on each mashup? Google has strict limits on the number of KMLs, and if they’re exceeded the file won’t display.

                                Viewing 15 posts - 376 through 390 (of 1,120 total)