Different map zoom levels
This topic contains 12 replies, has 3 voices, and was last updated by Alex Rollin 5 years, 10 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 20, 2019 at 6:43 am #475470
Hello,
I get different map zoom levels on a place details page and an event details place.
On the place details page the map is zoomed out too far, and on events too close.
I’ve examined the map tab item on the tab settings page, but there are no options for a zoom level.
Regards,
MartinMarch 20, 2019 at 7:09 am #475477Hi Martin,
Thanks for your post. Did you insert your GD map as a shortcode / widget? If you’re not sure, share your Website WP admin access here in private reply and I’ll check this out for you.
Thanks!
March 20, 2019 at 7:43 am #475483This reply has been marked as private.March 20, 2019 at 7:57 am #475486Hi Martin,
Thanks for your reply. I get what you mean now. Unfortunately, there isn’t an option to adjust map zoom level in the “Tab”.
You can only adjust the map zoom on widget maps.
Thanks
March 20, 2019 at 8:49 am #475496Thanks Kor. But how comes that the zoom levels differ? And can you give me a hint how to hide the navigation overlay?
March 20, 2019 at 12:22 pm #475520Hi Martin,
Thanks for your reply. Which map are you comparing with? To remove the OSM overlay, you can apply the custom CSS code into the theme. Insert into Appearance > Customize > Additional CSS.
.leaflet-routing-container { display:none!important; }
March 20, 2019 at 12:50 pm #475525Thanks, the code works!
I compare this map (event listing)
https://edelmut.org/veranstaltungen/hoppetosse-in-wedel/#post_mapto this map (place listing)
https://edelmut.org/organisationen/haende-fuer-kinder-und-der-neue-kupferhof/#post_mapAlthough there are place listings, which are zoomed in like the events example:
https://edelmut.org/organisationen/berndtsteinkinder-stiftung/#post_mapOthers are way too much zoomed out:
https://edelmut.org/organisationen/institut-fuer-konstruktive-konfliktaustragung-und-mediation-e-v/#post_mapThe zoom level seems kind of random to me.
March 20, 2019 at 7:38 pm #475590This reply has been marked as private.March 20, 2019 at 10:22 pm #475618Hi!
Be default the map shown on the detail page, the one that is in the tabs, that map uses the GD Map element with the option “Use post map zoom and type?” enabled. That means that whenever a user enters the add listing form and adjusts the map zoom, that zoom level is saved with the listing and used to determine the zoom of the map on the tab (or any other map shown on the page with the option enabled).
So, want to change that?
To override the default settings of shortcodes used in tabs you have to:
Go to the tabs UI for the CPT
Remove the tab
Add a new tab (using the fieldgroup)
Add a new shortcode field to that tab
Include a GD Map shortcode that has the options you want (like turning off that option above)You might want to use a shortcode like this one:
[gd_map width="100%" height="425px" maptype="ROADMAP" zoom="1" map_type="post"]
What you don’t want is
post_settings="1"
because that will use the zoom settings of the user doing the input.
Let us know how it goes
March 22, 2019 at 7:16 am #475858Thank you Alex. I followed your advice and added a new tab with your proposed shortcode, but the zoom level still gets overridden by the zoom level saved during a listing entry.
So I deleted the tab and installed the GD Map widget instead, but no matter what zoom level I enter, the override still takes place.
By the way: I have noticed a considerable slowdown of loading time of the tab selector on mobile devices. The page loads and content gets displayed, but the tab dropdown selector takes a few seconds to be filled with content.
Therefore I am thinking of deleting the Map Tab completely and take the maps on sidebar route. But the issue of the „user preset zoom level during entry“ issue remains.
Am I missing something? Can you please have a look by using the #475483 credentials?
Regards,
MartinMarch 23, 2019 at 2:51 am #476010Try this one:
[gd_map width="100%" height="425px" maptype="ROADMAP" zoom="14" map_type="post" post_settings="0"]
March 23, 2019 at 1:49 pm #476070Brilliant – now it works and the desired zoom level gets properly displayed under the Map Tab!
And regarding the Map Widget I have just found out that I have to set the Map Type to „Post Map“ in order to display the zoom level properly.
It’s good to have both options working. Now I can decide whether to integrate and reveal the map under a tab or in the sidebar.
Just in case someone else hast stumbled about this I have added a screenshot of my widget settings.
Thanks again Alex!
March 23, 2019 at 7:41 pm #476100Glad you got it working (and in more ways than one!).
With V2 there are lots of ways to accomplish the end goal
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket