Forum Replies Created
-
AuthorPosts
-
Hi,
Yes, there are unfortunately some geocoding limits imposed by Google (about 2500 per day if you’re using the free maps API). See the MapPress documentation for some details:
http://mappresspro.com/mappress-documentation#toc-geocoding-and-generating-maps-from-custom-fields
Hi,
This should work:
$mapwidth = "100%"; $mapheight = "100%";Note that if you set a height in %, you must have a containing element around the map that has an explicit height. Otherwise the browser will treat 100% of nothing, or zero.
Hi,
The syntax for querying by a custom field is different – you need to set ‘meta_key’ and ‘meta_value’.
See the MapPress documentation for some examples, or here for the WordPress codex:
http://codex.wordpress.org/Class_Reference/WP_QueryI think your query will look something like this:
[mashup query="post_type=church&fellowship=rpca&meta_key=state&meta_value=GA"]Hi,
Check that the special field is actually populated in the post you’re displaying. You should be able to see it in the WordPress post editor unless it is hidden (i.e. starts with ‘_’). If it’s hidden, check database table wp_postmeta for that post.
Then, modify map_poi.php with some ‘echo’ statements to see what’s going on:
<?php global $post; $postid = ($poi->postid) ? $poi->postid : $post->ID; echo "The post is: $post->ID and the field is: "; echo get_post_meta($postid, 'test', true); ?>If the above steps don’t help, please send me a login and I’ll see if I can find the issue for you. Please provide a post I can test with this special field.
Hi,
The query looks OK. Double check that:
– fellowship and rpca are the corrent name and slug for that taxonomy
– you have maps in the posts with taxonomy fellowship = rpcaIf you’re still getting a blank map, there is probably an issue with the query. One way to validate the query is correct is to try it in your browser. For example:
http://www.example.com/church/?fellowship=rpca
Another way to test it is to output the query result in the theme. Add this to a template file such as ‘index.php’ or ‘footer.php’:
<?php $wpq = new WP_Query("fellowship=rpca"); print_r($wpq); ?>Hi,
Perhaps there is a syntax error? Below is a template file that will display field ‘test’ just below the POI body.
If that doesn’t work for you, please provide your template file and let me know if you’re displaying a map or mashup, along with any other details that might help.
<div class='mapp-iw'> <div class='mapp-title'> <?php echo $poi->get_title_link(); ?> </div> <div class='mapp-body'> <?php echo $poi->get_thumbnail(array('class' => 'mapp-thumb')); ?> <?php echo $poi->get_body(); ?> <?php global $post; $postid = ($poi->postid) ? $poi->postid : $post->ID; echo get_post_meta($postid, 'test', true); ?> </div> <div class='mapp-links'> <?php echo $poi->get_links(); ?> </div> </div>Hi, the body is just a single field, but if you want to display other custom fields in the infowindow you can modify the POI display template file ‘map_poi.php’. See the documentation for some info about modifying templates.
Here’s an example to print a custom field for mashups or single maps:
<?php global $post; $postid = ($poi->postid) ? $poi->postid : $post->ID; echo get_post_meta($postid, 'my_field_name', true); ?>Hi,
I think this is because the theme or one of the plugins is including a very old version of jQuery from the google repository. WordPress is loading the current version of jQuery (1.10.2), but this line is subsequently also loading 1.5.1:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>You’ll need to remove that line or update it to 1.10.2. It may be coming from the theme or from a plugin. You can check by switching to the standard 2014 theme for a moment, or by temporarily deactivating your other plugins to see if that line disappears.
Hi,
That’s generally not a MapPress error, it’s usually caused by another plugin or a corrupted file.
If you know how to check your PHP error log, you should be able to find the offending file and line number there.
Another approach that usually works is to just disable ALL of your other plugins. If that fixes the problem then reactivate until you find the culprit.
In some rare cases I’ve seen this problem from a corrupted WP install, so you can also try re-downloading the WordPress files.
Hi,
Google Maps won’t display properly in tabs or other controls that hide the map. I provide a workaround for jQuery tab controls with the plugin. If you’re using a different library there is some additional information in the FAQ:
Hi,
Google maps don’t display properly in tabs or other controls that hide the map. It’s a Google issue, but I provide a workaround for jQuery tab controls. There is some additional information in the FAQ:
This may help:
- When the post is saved, MapPress reads the custom field values and generates the map.
- The map is saved in table ‘mappress_maps’ and its relationship of the map ID to the post ID is saved in table ‘mappress_posts’.
- There are some functions in file ‘mappress_map.php’ that can be used to read maps or lists of maps.
Hi, I don’t understand your question but I did reply to your email if you’d like to clarify.
Hi,
MapPress requires that each map be associated with a post. But I think Gravity Forms will automatically generate a post on the backend with the data you enter, is that correct?
I think they also save the entered data as custom fields.
If so, you can use the MapPress ‘geocoding’ settings to generate the map in that post from those custom field values. For example if your form includes a field ‘address’ then use that field in the geocoding settings.
I’d suggest configuring geocoding and creating a post manually from the custom field(s) to test that it’s working. Then try sending in the same fields from GF to generate it.
There’s some additional information on setting up geocoding in the documentation.
Hi,
If you check the page HTML, is the map object named mapp0? That’s the default name for the first map on the screen (you can also control it in the shortcode with name=”myname”).
You can also see on the page source if the map is being loaded after document ready. If so, try using that jQuery event:
jQuery(document).ready(function() { ..code... });If you queue your ‘ready’ event in the footer of the page, it should execute after the one queued to create the map object.
If the above don’t help then you may want to look at modifying mappress.php where the map is output to include your ready event there. If you take that approach let me know and I’ll try to include an action or filter hook there for future development so you don’t need to keep applying the modification.
-
AuthorPosts
