function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Krrish GopalKrrish Gopal 

<apex:repeat> within an <apex:map>

Day_Activity__r(Child) --> Day_Item__r(Master)
Day_Item__r(Child) --> Kips_PJP_Weekly_Plan__c(Master)

Visualforce Page Code
Error: <apex:repeat> cannot be used inside <apex:map> in the markup

<apex:page standardController="Kips_PJP_Weekly_Plan__c">
<apex:map width="100%" height="500px" mapType="roadmap" zoomLevel="15" scrollBasedZooming="true" showOnlyActiveInfoWindow="">
<apex:repeat value="{!Kips_PJP_Weekly_Plan__c.Day_Item__r}" var="v1">
<apex:repeat value="{!v1.Day_Activity__r}" var="v2">
    <apex:mapMarker title="" position="{!v2.Geolocation__Latitude__s},{!v2.Geolocation__Longitude__s}">
            <apex:mapInfoWindow >
                <apex:outputPanel layout="block" style="font-weight: bold;">
                    <apex:outputText >{!v2.kips_Account__r.Name}
                    </apex:outputText>
                </apex:outputPanel>
            </apex:mapInfoWindow>
    </apex:mapMarker>
</apex:repeat>
</apex:repeat>
</apex:map>
</apex:page>
Abhishek BansalAbhishek Bansal
Hi Krrish,

Only arrays and lists are supported in apex repeat.
You could get the values from the map into a list that you can use in a visualforce page with the values() function. What I usually do if I need to display the values of a map in a visualforce page is write a function in my controller or extension that returns the value list. Something like:
public Cases[] getMappedCases() {
  return MyMapOfCases.values();
}

Then in visualforce
<apex:pageBlockTable value="{!MappedCases}" var="case" id="CaseListTable">
</apex:pageBlockTable>

Let me know if this works for you.

Thanks,
Abhishek Bansal.