Map doesn't resize on mobile device

  • sanax
  • sanax's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
5 months 2 weeks ago #11269 by sanax
sanax created the topic: Map doesn't resize on mobile device
Hi Dima

First of all, I have to congratulate you with an awesome module! Just what I was looking for. I have one problem though and I seems to not getting an answer in the searches.

I can't get my map to resize to fit a mobile device. I've set the width and length to "0" within the 'Map Details' page. The problem is when I add the map to a new menu, I have to set a pixel size (not a % option) otherwise the map doesn't show up. If I do add a pixel size, the map shows up but doesn't resize on a mobile device.

I'll appreciate some help!

TIA

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #11270 by Dima
Dima replied the topic: Map doesn't resize on mobile device
Hi, thanks.
I think you can try to do a little trick.
Now you create menu item (Map), and your template have complicated nested divs, and it cause a map div collaps, ie you can't see the map with width and length = 0.
Try: change menu item to an article, and call my plugin (by map ID).
I think it can help you.

Don't forget support my developments: post review in JED, donate ;)

Post your sites as examples into my directory
Zh GoogleMap: forum.zhuk.cc/index.php/forum/gm-user-s-sites
Zh YandexMap: forum.zhuk.cc/index.php/forum/ym-user-s-sites

Please Log in or Create an account to join the conversation.

  • sanax
  • sanax's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
5 months 2 weeks ago #11271 by sanax
sanax replied the topic: Map doesn't resize on mobile device
Thank you! Unfortunately I have maps for 50 states in the US with subcategories and to use the MAP ID will be an enormous challenge. Hope you can fix the problem in future releases.

Please Log in or Create an account to join the conversation.

  • sanax
  • sanax's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
5 months 2 weeks ago #11272 by sanax
sanax replied the topic: Map doesn't resize on mobile device
Hi Dima

I would like to give it a try! How will I call your plugin with map ID into an article? A short description will be appreciated!
TIA

Please Log in or Create an account to join the conversation.

  • sanax
  • sanax's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
5 months 2 weeks ago #11273 by sanax
sanax replied the topic: Map doesn't resize on mobile device
I've tried the code below but it still doesn't resize. Is this what you suggested?

{zhgooglemap:1;Zoom;ROADMAP;670;550}

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #11274 by Dima
Dima replied the topic: Map doesn't resize on mobile device
Hi
I just suggest try: {zhgooglemap:1}, without changing width and height.
It is not my bug. It is behavior of modern template with nested divs. You can check my forum about responsive template about height.
As for full screen, for example. If you want to have 100% height, you have to set 100% height for each nested divs, where your map is up to header.

I don't know about your maps, but you have the other 2 ways.
1 - use my full screen template for your maps, it contains only 3 sections, and it doesn't have nested divs.
2 - in map details there is a field "CSS Class" (it is in Advanced options tab), by setting it you change default class name for map div, and you can override styles on it in your template CSS, for example your own width and height in percents.

Don't forget support my developments: post review in JED, donate ;)

Post your sites as examples into my directory
Zh GoogleMap: forum.zhuk.cc/index.php/forum/gm-user-s-sites
Zh YandexMap: forum.zhuk.cc/index.php/forum/ym-user-s-sites

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds

Donate


Go to top