I have a map, Map<Id, Contact> contactsMap
in my apex class where key is the contact id and value is the contact itself. I am iterating over this map in visualforce page to get the contact's Location and mark it in the map(I have other functionality in the page with individual contact. Hence used a map. Using a list of contacts don't suffice my requirement). Below is the snippet of vf code:
<apex:repeat value="{!contactsMap}" var="con">
<apex:map width="100%" height="320px" mapType="roadmap" zoomLevel="17" center="{!con.Address__c}" >
<apex:mapMarker id="mymap" position="{!con.Address__c}" rendered="true"/>
</apex:map>
</apex:repeat>
The above piece of code isn't saving and the page throws the compile error as below:
Invalid type for attribute
<apex:map id="mymap" center>:
must be either String or Map.
Can someone let me know where I have went wrong and how this can be solved.