• Saravana Rajkumar 16
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I'm trying to plot more than 10 apex:mapMarker on a visualforce page using JSON object or apex Map object for the 'position' attribute, but the map limits the number of map markers to be not more than 10.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_mapMarker.htm
As per Visualforce Developer Guide link above, there should not be limit on mapMarkers when i'm using position values that don't require geocoding. 

Controller:
Loading transportLocationContainerList with 2 entries
Loading shipmentTrackingContainerList with 10 entries

VF page:
<apex:pageBlock mode="maindetail">
    <apex:map width="100%" height="500px" mapType="roadmap" scrollBasedZooming="true" showOnlyActiveInfoWindow="true">
        <apex:repeat value="{!transportLocationContainerList}" var="transportLocationContainer">
            <apex:mapMarker title="{!transportLocationContainer.TransportLocation.Name}" position="{!transportLocationContainer.GeolocationMap}">
            </apex:mapMarker>
        </apex:repeat>
        <apex:repeat value="{!shipmentTrackingContainerList}" var="shipmentTrackingContainer">
            <apex:mapMarker title="{!shipmentTrackingContainer.ShipmentTracking.Name}" position="{!shipmentTrackingContainer.GeolocationMap}">
            </apex:mapMarker>
        </apex:repeat>
    </apex:map>
</apex:pageBlock>

Could you please explain why the geocoding limit is exceeding and how to overcome the limit?
I'm trying to plot more than 10 apex:mapMarker on a visualforce page using JSON object or apex Map object for the 'position' attribute, but the map limits the number of map markers to be not more than 10.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_mapMarker.htm
As per Visualforce Developer Guide link above, there should not be limit on mapMarkers when i'm using position values that don't require geocoding. 

Controller:
Loading transportLocationContainerList with 2 entries
Loading shipmentTrackingContainerList with 10 entries

VF page:
<apex:pageBlock mode="maindetail">
    <apex:map width="100%" height="500px" mapType="roadmap" scrollBasedZooming="true" showOnlyActiveInfoWindow="true">
        <apex:repeat value="{!transportLocationContainerList}" var="transportLocationContainer">
            <apex:mapMarker title="{!transportLocationContainer.TransportLocation.Name}" position="{!transportLocationContainer.GeolocationMap}">
            </apex:mapMarker>
        </apex:repeat>
        <apex:repeat value="{!shipmentTrackingContainerList}" var="shipmentTrackingContainer">
            <apex:mapMarker title="{!shipmentTrackingContainer.ShipmentTracking.Name}" position="{!shipmentTrackingContainer.GeolocationMap}">
            </apex:mapMarker>
        </apex:repeat>
    </apex:map>
</apex:pageBlock>

Could you please explain why the geocoding limit is exceeding and how to overcome the limit?
I would like to be able to mark spots on my map using a marker by drawing out information from a geolocation field but everytime I use !Account.Geocode__c it gives me  this error

Error: Unsupported type: common.api.soap.wsdl.Location used in expression: Account.Geocode__c

Can anyone help me
 
<apex:page standardController="Account">

<apex:map width="100%" height="400px" mapType="hybrid" zoomLevel="15"  
        center="{!Account.BillingStreet},{!Account.BillingCity},{!Account.BillingState}">
       <apex:mapMarker position="{latitude:{!Account.Location},longitude:{Geocode__c}}"/>               
</apex:map>


    
</apex:page>