Visualforce provides a set of related mapping components. The <apex:map> component defines the map canvas, including size, type, center point, and initial zoom level. The <apex:mapMarker> child component defines the markers to place on the map by address or geolocation (latitude and longitude). You can use the <apex:mapInfoWindow> component to add customizable information panels that appear when a marker is clicked or tapped.
Maps that you define in Visualforce markup generate JavaScript code to render onto the page. This JavaScript connects to a mapping service and builds the map by fetching map tiles and placing markers. If your items to be mapped don’t have a latitude and longitude, Visualforce maps can geocode their addresses. After the map renders, your users can interact with the map by panning and zooming, just like they’re used to with other map sites. The effect is as if you wrote your own custom JavaScript to interact with a third-party mapping service, but without actually needing to write it. You define the map in Visualforce and get the mapping JavaScript for free.