I am trying to:
Use google maps to show a street address. Works great! Except zoom is always at most zoomed in level.
I tried many different things - here where I'm at now...
[wpv-map-render map_id="map-1" single_zoom="13" general_zoom="13"]
[/wpv-map-render]
[wpv-map-marker map_id="map-1" marker_id="marker-1a" marker_field="wpcf-google-address"]
[/wpv-map-marker]
(p.s. not sure where the map marker tag goes - inside of map-render? - I tried that, no love.)
Link to a page where the issue can be seen:
hidden link
I expected to see:
zoomed out about 5 levels.
Instead, I got:
maximum zoomed in.
We have a Documentation that illustrates how to set up a Map, both in a view or single post:
https://toolset.com/documentation/user-guides/#toolset-maps
In a view, for example, you will place the Maps shortcode before the Loop tag, using the "Fields and Views" GUI, then, within the Loop, you will add the Marker, as well using the GUI.
In that case, not much of manual adjustment is needed, you can even pass the Zoom Levels with the GUI.
On Single Posts, or Content Templates or similar, this works the exact same, just that you do not need to place the Map outside any loop since there is no loop at all in a Single Post.
I tested several default Zoom Levels and they all work fine:
[wpv-map-render map_id="map-2" single_zoom="10"][/wpv-map-render]
[wpv-map-marker map_id="map-2" marker_id="marker-2" marker_field="wpcf-address"][/wpv-map-marker]
I also tried with "1" and others, it works.
If this does not work on your end, can you let me know if I followed the right steps, and if so, I would suggest to try without any other Plugin but Toolset and eventually also test with another theme.
I did exactly what you said. For some reason still stuck at furthest in zoom level. I guess I'll have to continue on the path as you said and start turning off plug-ins.
Very frustrating as it's so close.
[wpv-map-render map_id="map-2" single_zoom="13"][/wpv-map-render]
[wpv-map-marker map_id="map-2" marker_id="marker-2" marker_field="wpcf-google-address"]
[/wpv-map-marker]
<br />
raw: [types field='google-address' output='raw'][/types]
Googling further, I'm wondering if I can use the javascript shown here - https://toolset.com/forums/topic/google-maps-wpv-map-render-argument-single_zoom-not-working/ , i.e.,
jQuery(document).on('js_event_wpv_addon_maps_init_map_completed', function() {
var options = {'maxZoom': 13};
WPViews.view_addon_maps.get_map('map-1').setOptions( options );
});
I'd try this, but since I'm in a Template for a custom type I created, I don't see how to jam in the Javascript. The link above was for a view.
Thanks in advance!
p
Custom JS is added to Toolset > Layouts CSS/JS, but as said, this is neither necessary nor expected.
The issue must be within specific settings you use or another Plugin/Theme.
I would like to solve this problem for you, but without a replicable issue, I cannot do much.
Please can you let me know the results of the tests suggested here:
https://toolset.com/forums/topic/map-is-not-showing-up-at-desired-zoom-level-instead-always-at-full-zoom-in/#post-625840
If nothing helps, you may as well add a Duplicator Package, this can help me to see and then fix the issue much faster:
https://toolset.com/faq/provide-supporters-copy-site/
Turns out that I hadn't emptied my trash. Old versions of the data were apparently corrupting - something - that caused maps to not work correctly. This also occurred in other areas, e.g., search results for the same custom elements.
Thanks for support though - Toolset is great and responsive that way!