You need to sign in to do that
Don't have an account?
<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>
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>
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:
Then in visualforce
Let me know if this works for you.
Thanks,
Abhishek Bansal.