Forum Replies Created
-
AuthorPosts
-
Hi,
The plugin prints one line of javascript and the CSS link before the page is displayed, because it can’t predict if there will be a map shortcode (or PHP code) within the page content. All script files, including the Maps API, are loaded only when a map is actually output.
The option to prevent loading the CSS completely was removed because most sites seem to use ‘minify’ plugins to combine and minify CSS files. It seemed easier to do that than to manually copy the MapPress classes to the main theme CSS file, especially since those classes will be changing more rapidly with the next few versions.
Hi,
I tried emailing you to discuss this but my note is probably sitting in a spam folder. In your site is it possible to use the ‘minZoom’ setting instead of center/zoom? That setting prevents users from zooming too far out – as well as setting the initial map zoom. For example:
[mashup minZoom="4"]Hi,
Unfortunately, the way the list events are handled internally has changed.
The plugin now relies on events bubbling to the map container, so the list must be inside the main layout class (‘.mapp-layout’).You can, however, use CSS to position the list (for example to the left or right of the canvas).
It’s not documented yet, but there is a ‘layout’ parameter and CSS that can be used to position the list to the left, for example:
[mashup layout="left" poilist="true"]Sorry for my slow reply – this unfortunately isn’t trivial (it requires a custom infobox, etc.). But I’ve got it on my feature requests list.
The easiest way to do this is using the query itself. You may specify a custom field name and then use that field to order the results:
[mashup query="post_type=any&meta_key=myfield&orderby=meta_value&order=asc"]
Note that only one field is supported.
The documentation for WordPress ‘wp_query’ has more details – different ordering types, changing the order (ascending/descending) or sorting by numbers instead of characters:
Hi,
That dropdown matches the MapPress fields to the custom fields that already exist in your system (i.e., where one or more posts has those fields). Because ‘meta-name’ is specific to your system I can’t tell you if it’s the right field to use for POI titles – you’ll need to try it.
Also in case it helps, here are two other things to know about titles:
1) If you use an address instead of lat/lng in the geocoding fields, the plugin will show the address as the title by default.
2) In mashups, you can set the plugin to display the post title rather than the POI title.
Hi,
That seems to just show map #2, if a lat/lng custom field is present, so it would show whatever was saved in map #2.
Are you also using the ‘geocoding’ settings to generate a map in the post? If so, you can configure a field for lat, lng AND poi title, and the generated map should use that title. If you’re not using this already, please see the documentation for details about setting it up. You can use your existing custom fields and existing posts – just update the posts to generate the maps.
Mashups autocenter so all the POIs are visible, so the center argument will be ignored.
Hi,
There’s a few things to check:
1. Confirm that the version shows ‘pro’ at the end in the MapPress settings screen?
2. Check for a javascript error: try deactivating ALL other plugins and switching to the twenty seventeen theme (for a moment). If you now see the icons, reactivate one by one to find the problem
3. Bring up the javascript console in your browser (F12 in most browsers) and check for any error messages.Hi,
This kind of weird behavior happens when the maps API is loaded multiple times. Something else (the theme or another plugin) must be loading it.
Please see the FAQ for some suggestions:
http://mappresspro.com/mappress-faqHi,
The grid is coming from the theme’s CSS. This rule is being loaded on the page, and the grey outline on the map is the box shadow:
.single .col-mod-single img { box-shadow: 1px 1px 1px 1px silver; border-radius: 3px; }Hi,
I can’t really add anything based on that information. But if you’d like, you can use the contact form to email me a login and provide an example.
Also, as I mentioned above: please be sure you’re using a separate server key, and don’t restrict it by IP for your initial testing.
Hi,
Here’s some things to check:
1. You need two API keys: one for the front-end (‘client’) and one for geocoding (‘server’). The server key is secured by IP address instead of the referring domain. Make sure both have been set up in the Google control panel and in the MapPress settings screen.
2. Make sure your project has the geocoding API enabled in the Google control panel.
3. Check your usage – Google’s free geocoding limits are small, I think around only 2500 locations.
If the above don’t help, feel free to use the contact form to email me a login and I’ll see if I can find the problem.
Hi, thanks for reporting the issue, I think I’ve just fixed it. Please send me an email at your convenience so I can provide you with a copy of the update to test.
Hi,
If you are using the post excerpt for the POI body, I think the WordPress standard ‘excerpt’ function strips out shortcode tags. Some themes replace this with their own function which may allow the shortcodes to pass through. You could try temporarily switching to a standard theme to see if the shortcodes are stripped out – and check your ‘functions.php’ file for anything shortcode related.
If that doesn’t help, this function can be used to strip out shortcode tags:
https://codex.wordpress.org/Function_Reference/strip_shortcodesSeptember 7, 2016 at 5:19 am in reply to: Google Maps API Key issue when displaying maps via php #16986Hi,
I’m glad you solved that, from the description I never would’ve guessed you were reading & saving the options in custom code.
Normally I would suggest making settings changes in the map object’s constructor or display() method, as shown in the documentation examples. But if you need to use the internal ‘options’ object, try calling the get() method first, to get the existing settings before calling the save() method to save them.
-
AuthorPosts
