I have a page that will render properly only when showHeader="false" in the apex:page tag.

When it's set to true I get the following...

enter image description here

However, when it's set to false, I get a full-page map from Google (further down).

My page is very simple...

<apex:page standardController="Feral_Cat_Map__c"  showHeader="false" >
    <c:mapping /> 

Then the component is...

<apex:component controller="mappingController">
    <!-- A lot of JavaScript -->

    <body class="area">
        <div id="panel">
            <b>Enter address: </b><input id="address" type="textbox" size="50" />
            <input type="button" value="Search" onclick="geocodeAddress()"/>
            <div id="map-canvas"></div>             

So - have you come across this before? Any ideas why changing the showHeader setting would cause it to fail?

What it should look like follows...with the header added, of course

enter image description here

  • Some of your javascript code clashes with the standard salesforce javascript. Try rename some of your global variables and methods see if that fixes it. May 1, 2015 at 5:46
  • I'm pretty sure having a <body> tag in a component might be the cause of your pain...
    – Matt Lacey
    May 1, 2015 at 5:53
  • @LaceySnr - thanks for the tip but the behavior is exactly the same with the body tag in the component or in the page.
    – sberley
    May 1, 2015 at 5:57
  • Doh, worth a crack. What's controlling the styling for the map?
    – Matt Lacey
    May 1, 2015 at 6:00
  • Styling is from Google Maps settings (mostly defaults) with custom based on logic in the JS code. Data's coming in via JS remoting to the Apex controller.
    – sberley
    May 1, 2015 at 6:03

2 Answers 2


Since the solution isn't obvious, I was thinking...it works perfect when added as a VisualForce page through the Layout Editor (shown below).

So, rather than hunting for the problem, couldn't I just mimic that infrastructure?

What does the wrapper around dropped in pages look like?

enter image description here

  • sberley, did you want to make an edit to your question ? It's a "best practise" to keep all parts of your question centralized there, so that answers are only solutions to that questoin and not replies. If you're new to stackexchange, i'd recommend having a look at our welcome your May 4, 2015 at 7:48

I had posted this on another thread asking about a different approach that might solve the problem. Shortly afterward I had an idea that resolve it.

See this posting in case you're faced with a similar problem...

Good luck,


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .