I am trying to:
Show a map with all posts of a specified category, zoomed to show all posts
Link to a page where the issue can be seen:
hidden link
hidden link shows, that it is OK with more than one marker
I expected to see:
The marker should be displayed at zoom level 12, if there is only one marker, otherwise all markers should be shown at the optimal zoom level (fitbounds="on")
Instead, I got:
The single marker is shown at maximum zoom.
==============================================================================================
The filter is
Select posts with taxonomy:
Categories slug in one of those set by the View shortcode attribute category
eg. [wpv-view name="view-name" category="xxxx"]
[wpv-filter-start hide="true"]
[wpv-filter-controls]
[/wpv-filter-controls]
[wpv-filter-end]
The Layout is (the buttons below map are left out for simplicity):
[wpv-layout-start]
[wpv-items-found]
[wpv-map-render
map_id="map"
map_height="400px"
general_zoom="1"
general_center_lat="30"
general_center_lon="8"
single_center="off"
single_zoom="12"
fitbounds="on"
cluster="on"
cluster_grid_size="15"
cluster_max_zoom="10"
spiderfy="on"
map_type="terrain"
style_json="//travelstories.at/wp-content/plugins/toolset-maps/resources/json/Standard.json" ]
[/wpv-map-render]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-map-marker
map_id="map"
marker_id="marker-[wpv-post-id]"
marker_title="[wpv-post-title]"
marker_field="wpcf-address"
marker_icon="[wpv-conditional if='( NOT(empty($(wpcf-icon))) )'][types field='icon' output='raw'][/types][/wpv-conditional]"]
[wpv-post-body view_template="post-bubble" suppress_filters="true"]
[/wpv-map-marker]
<!--[wpv-post-body view_template="marker-post"]-->
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpv-post-body view_template="map-without-extent"]
[/wpv-no-items-found]
[wpv-layout-end]
The output is:
[wpv-layout-meta-html]
[wpv-filter-meta-html]
I understand that you want a Map to display all Markers in the Zoom that is best to show them all - if there are several, and with a Zoom level of 12, if there is just one in this specific Taxonomy Filter you use.
I tried that and succeeded with this steps:
- Create a Few Posts with Taxonomy Terms and Addresses, so at the end, you have one term with only one post, and one term with several posts, all having addresses.
- Created a View, queried those posts and added the Query Filter:
Select posts with taxonomy:
Tags slug in one of those set by the View shortcode attribute wpvposttag
eg. [wpv-view name="view-name" wpvposttag="xxx"]
(any query filter will work)
- Add this map, using the GUI:
[wpv-layout-start]
[wpv-items-found]
[wpv-map-render map_id="map-1" single_zoom="12"][/wpv-map-render]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_field="wpcf-toolset-address"][/wpv-map-marker]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
- inserted the View to 2 pages, once passing the Term with many posts and once with just one post
The output is as expected, the map centred so to show all posts if there are several, and zoomed to level 12 if there is just one.
Can you try these steps on your install?
If they do not work, it must be another plugin or the theme interferring, or some specific settings that I missed in my test.
Please let me know the results.
Thank you very much for the fast response.
You are right, there is an incompatibility with WP Google Map Pro from plugin from Flippercode. It works, when I deaktivate this plugin. I could not have imagined, that another plugin could be the reason for this as everything else seems to work without a problem.
My problem is though, that I need another Map plugin to display routes in KML format and other information, that your map is not able to do. I tried to use this for displaying posts on a map too, but it could not do what I wanted (toolset maps is much more flexible to do this).
Do you know any powerful map plugin, which can coexist with Toolset plugins?
The simple problem here is that you would have two calls to the API and that usually already is the reason for it to fail.
We have some feature requests in place to exclude our API call if you already use another Maps Plugin that is based on Google, but that will solve the issue you mention probably only partially.
The question is, what do you need (we can request features) and what are the steps to replicate the issue.
Becuase, if I can replicate it, eventually I can come up with some solution, or we can contact the 3rd Party Developer to work together, who knows we can manage to find solutions.
Can you add a copy of the plugin and steps to replicate the issue?
Then I can at least do as much as start an analysis, which is still better then nothing 🙂
As for other plugins, the problem remains that if you have two plugins or theme + Plugin delivering a MAP API of Google, you will most likely run into conflicts.
This is unavoidable, but sometimes it can be solved by either new features or other approaches.
Let's look a little deeper; maybe we can find something to help you better here.
I appreciate, that you are willing to help, but the Maps plugin is not free and so I can not give it to you. Also the plugin was just active without any map being displayed on any page or post. So where would a parallel API call come from. I am sure you could replicate the problem by just installing the plugin and entering the API key maybe. Maybe Flippercode might want to cooperate with you and give it to you for testing?
See hidden link (I can not send the URL to the Map plugin, because their site is currently down) for the plugin.
I want to show maps in some posts with one or more KML overlays showing some sports tracks recorded with a GPS tracker, and show markers at points of interest, described in the blog, with photos.
I bought this WP Google Maps Pro plugin, because it promised to do everything, and it did. But the way it works with having to duplicate the complicated map configuration to just display similar maps with different extents and different filters on the posts made it soon clear, that this could not be handled with a growing Blog with many different categories and posts. This is where your plugin really excels and I am glad that I found it for other reasons too. But for individual maps displaying content unique to posts with linear features I need another solution.
Maybe, if there are not more problems coming up, I could live with the zoom problem, which I only have, while only one post exists for any category. But who knows what else will be coming up...
Sure, that's no problem.
Maybe I did not make myself clear.
I do not request the plugin for my own purposes or library, but it would be used solely by OTGS Employees in the margin of compatibility tests.
Usually, we keep a copy of this software until the issue is confirmed as solved, but we never would use this elsehow, that's simply illegal 🙂
The problem is not that you need to display something to trigger the issues.
When the API is called, and that happens with, even if the plugin is just installed, then this can clash.
Sure, I will try to contact the authors, so we can figure out a way to get each other's plugin's and play with them, to see if we can manage to exclude one of the scripts when both are active.
I will try this here:
hidden link
Right now, the suggested an official statement is, to not use more than one Plugin or Theme that uses the Google Maps API.
Please acknowledge that I will try to enter in contact, but I can neither promise a successful cooperation nor a solution.
Thank you for understanding
Another thing I forgot to mention is, that after showing a map with more than one posts and then applying a filter, which reduces the number of posts to only one, the single marker is shown correctly.
Our replies crossed each other.
For compatibility processes, there is no way around using a copy of the plugins.
As stated I will try to contact them, I already created an internal Ticket for this process.
Maybe we will need more details once we are ready to work on this and then I will contact you back here.
Before we don't have this we can't proceed, and the solution is even then probably not achievable without disabling one of both plugins.
I have installed another plugin, also called WP Google Maps, which is free, but also has a Pro plugin, which I bought for another blog. It does not offer any possibility to automatically show filtered posts on maps, but would make it possible to use a KML layer in the Pro version.
At first, after installing the free base plugin, everything still worked. But as soon as I installed the Pro Addon, there is the same problem again.
hidden link
Yes, as I stated earlier, the current situation is that you can not use several Google Maps plugins or Themes on the same WordPress install.
I cannot purchase PRO versions of other Plugins to test them.
The initial problem's plugin was that the Toolset Maps Zoom isn't respected anymore if that other Maps Plugin is active.
Correct?
To test, confirm and fix that (whether we fix it on our end, or we work with the Developers to fix it on their end) we will need a copy of the plugin so to replicate the problem and test it later.
I opened an internal issue tracker where will try to get in contact with the developers, achieve collaboration and then see to replicate and eventually fix the issue.
Maybe you can contact the developer and ask if they are interested in a cooperation and if it's possible to get a copy of the plugin.
We do offer our plugins (for free) to developers who ask us for, so to achieve greater compatibility.
However, without a copy, and without a replicated issue, I can not really induce a fix for this.
I cannot ask the Developers to analyse and fix this on a unique online site - we would need to induce a broader development work with updates and all related tasks like QA, Doc, and so on.
Thank you very much.
I will try to contact the developer and ask too if he wants to cooperate.
Yes, please.
The problem is I cannot reach them
The Current Site of contact fails to me with an error.
hidden link
(This is what is linked to from "Contact)
Can you help us to get in contact?
It works now, but the answer takes very long. Might be a timeout problem.
But with much patience I could login and asked them to cooperate.
Great, thank you.
Please acknowledge that I (or our compatibility team) will handle all this communication.
You don't (usually) need to invest your time in this.
As soon I have a form to contact them, we will handle this.
Eventually, can you ask to share an email so we can enter in direct contact - or, you may use the Emails I shared with you in private (I have sent you an email).
Thank you.
Unfortunately their site is down every time I try to reach them.