---
schema_version: "1"
id: b7b44e39336ecea64d273fedc723e1d2a1ea90b2397b8ed660c3c6060fbf6a31
title: apex:mapInfoWindow
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/components/pages-compref-mapinfowindow.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-mapinfowindow.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 304d3178b7bd55b4ef7e946ab359c7f379eb80d0cf3e45aeb8bab9524ddd13e1
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# apex:mapInfoWindow

Defines an info window for the marker displayed at a location on an `<apex:map>`. The body of the `<apex:mapInfoWindow>` component is displayed in the info window when users click or tap the marker. The body of the `<apex:mapInfoWindow>` can be Visualforce markup, HTML and CSS, or even plain text.

By default only one info window displays at a time. That is, when you click another marker, the first info window disappears and the new info window appears. To display multiple info windows at once, set `showOnlyActiveInfoWindow` to `false` on the containing `<apex:map>` component.

**Note:** This component must be enclosed within an `<apex:mapMarker>` component.

## Map of Contacts for an Account

```apex
<apex:page standardController="Account">

  <!-- This page must be accessed with an Account Id in the URL. For example: 
       https://MyDomainName--c.vf.force.com/apex/NearbyContacts?id=001D000000JRBet -->
  
  <apex:pageBlock >
    <apex:pageBlockSection title="Contacts For {! Account.Name }">
    
     <apex:dataList value="{! Account.Contacts }" var="contact">
       <apex:outputText value="{! contact.Name }" />
     </apex:dataList> 
    
    </apex:pageBlockSection>
  </apex:pageBlock>
   
  <apex:map width="600px" height="400px" mapType="roadmap"
    center="{!Account.BillingStreet},{!Account.BillingCity},{!Account.BillingState}">

    <apex:repeat value="{! Account.Contacts }" var="contact">
    <apex:mapMarker title="{! contact.Name }"
    position="{!contact.MailingStreet},{!contact.MailingCity},{!contact.MailingState}">
    	<apex:mapInfoWindow>
    		<apex:outputPanel layout="block" style="font-weight: bold;">
    			<apex:outputText>{! contact.Name }</apex:outputText>
    		</apex:outputPanel>
    		<apex:outputPanel layout="block">
    			<apex:outputText>
            {!contact.MailingStreet},{!contact.MailingCity},{!contact.MailingState}
          </apex:outputText>
    		</apex:outputPanel>     		
    	</apex:mapInfoWindow>
    </apex:mapMarker>
    </apex:repeat>

  </apex:map>

</apex:page>
```

## Attributes

|Attribute Name|Attribute Type|Description|Required?|API Version|Access|
|--------------|--------------|-----------|---------|-----------|------|
|`id`|String|An identifier that allows other components in the page to reference this component.| |34.0|global|
|`maxWidth`|Integer|Maximum width of the info window, regardless of content's width.| |34.0||
|`rendered`|Boolean|A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to `true`.| |34.0||

**See Also**  


-   [apex:map](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-map.md)
-   [apex:mapMarker](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-mapmarker.md)
-   [Adding Info Windows to Markers](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/maps/pages-maps-info-windows.md)

