0

google maps sizing full height & width

asked 2017-09-26 22:27:00 +0800

ajamardo gravatar image ajamardo
41 4

updated 2017-09-26 22:30:06 +0800

I am implementing the google maps add-on, and I can't make it work to take all empty space in the layout, without giving it the exact pixels amount.

Is there any way, as using vflex/hflex (that I've tried but I haven't been able to make it work)?

Thanks for tour help in advance.

I attach you the code I have now

<vlayout vflex="1" hflex="1"> <hlayout vflex="1" hflex="1"> <gmaps version="3.26" id="gmaps" lat="37.4410" lng="-122.1490" showSmallCtrl="true" protocol="https"> <ginfo id="info" open="true" content="Hello, <a href="http://www.zkoss.org\">ZK</a>."/> <gmarker id="marker" lat="37.4410" lng="-122.1490" content="Hello, <a href="http://www.zkoss.org">ZK</a> on top of Gmarker."/> </gmaps> </hlayout> </vlayout>

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-09-27 10:49:17 +0800

cor3000 gravatar image cor3000
6280 2 7

updated 2017-09-27 12:38:30 +0800

I could reproduce a bug when nesting the <gmaps> component inside an <hlayout>

image description

If you can live without that the easiest way is to just use a <div>

<div vflex="1" hflex="1">
    <gmaps width="100%" height="100%" version="3.26" id="gmaps" lat="37.4410" lng="-122.1490" showSmallCtrl="true" />
</div>

or

<div vflex="1" hflex="1">
    <gmaps vflex="1" hflex="1" version="3.26" id="gmaps" lat="37.4410" lng="-122.1490" showSmallCtrl="true" />
</div>

UPDATE: I posted the following bug ZKGMAPS-18

A simple workaround is to apply a min-width to the gmaps component:

<gmaps vflex="1" hflex="1" ... style="min-width: 1px" />
link publish delete flag offensive edit

Comments

First, sorry to write the question with a code that can't be tested. I'll check that out before I post a question again. Also, without the min-width, the other solutions don't work for me, but just with the min-width is enough for me. THANKS

ajamardo ( 2017-09-27 14:49:11 +0800 )edit

if the min-width works for you then you must have encountered ZKGMAPS-18 before. I am glad the workaround helped.

cor3000 ( 2017-09-27 18:29:26 +0800 )edit
0

answered 2018-05-16 17:35:41 +0800

cor3000 gravatar image cor3000
6280 2 7

FIXED: ZKGMAPS-18 for 3.0.5

testable FL version v3.0.5-FL-2018-04-23

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2017-09-26 22:27:00 +0800

Seen: 13 times

Last updated: May 16 '18

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More