2

Currently I have a google map displaying in salesforce. If I set showheader="false" in the apex page tag, I can set the map div to 100% height.

If I set showheader="true" then I need a specific height, for example height:800px for the map div.

Is it possible to have the map fill the page space while having the salesforce header there and how would you do it?

0

Use apex variable for <apex:page showheader="{!Val}"> than put Java script code in your visualforce page. like

var bool = '{!var}';
if(bool = True){
   var heightpx = 800px ;
}else{
   var heightpx = 100px ;
}

after that you can put heightpx variable at the place of height:800px as height:heightpx

  • I'm not sure what you are aiming at there? This would set the map to relatively large or tiny depending on if the header is shown? In order to offer it as an option? I just wanted to know if you can have a header and a map that fills the space available. – Ronan Jul 3 '15 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.