Javatpoint Logo
Javatpoint Logo

<apex: mapMarker> Component in Visualforce Page

The <apex: mapMarker> is another important component in the Visualforce page that defines a marker to be displayed at a location on an <apex: map> component. We always use the <apex: mapMarker> component inside the <apex: map> component. We can use up to 100 <apex: mapMarker> components inside a single <apex: map> component.

The <apex: mapMarker> component has the following attributes:

1. icon

The "icon" is a string-type attribute used for specifying the URL of the icon that needs to be displayed for this marker.

Syntax:

2. id

The "id" is a string-type attribute used to specify the URL of the icon that needs to be displayed for this marker.

Syntax:

4. title

The "title" is a string-type attribute used to specify the text that needs to be displayed when the user moves the cursor over the marker.

Syntax:

5. position

The "position" is an Object-type attribute used to specify the marker's location. We can use one of the following ways to specify the position:

1. A string represents a JSON object with latitude and longitude attributes that specify location coordinates.

Syntax:

Let's take an example to understand how we can use this component on Visualforce Page:

ApexMapMarkerExample.vfp

Output

apex: mapMarker Component in Visualforce Page





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA