Skip Navigation

[Resolved] Map is not showing up at desired zoom level – instead always at full zoom in

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 replies, has 2 voices.

Last updated by peterG-12 6 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#625744
Screenshot 2018-03-16 12.34.26.png

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.

#625840

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.

#626316
Screenshot 2018-03-19 16.52.00.png

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]
#626327
Screenshot 2018-03-19 17.10.32.png

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

#626560

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/

#629161

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!