Geopointe contains a Visualforce Component for creating Static Maps (results in an image rather than an interactive map) that allows customers to use and create their own static maps from their Salesforce data.
At it’s simplest is using the component to center the map around a record and use your default mapping provider. This example uses MapQuest.
<geopointe:StaticMap center=”a07A000000ATQjhIAH”/>

You can also specify a width, height and choose a map provider (MapQuest, Google or Open Street Map).
<geopointe:StaticMap mapProvider=”goog” width=”500″ height=”300″ center=”a07A000000ATQjhIAH”/>

You can also remove the center parameter and add pins to the map using the locationIDs parameter. In this example, we are using MapQuest again.
<geopointe:StaticMap mapProvider=”mq” width=”500″ height=”300″ locationIDs=”a07A000000ATQjhIAH,a07A0000006O0qc,a07A0000006NKq2″/>

If you use Google as a Map Provider, you can also use Text Addresses into the component. For this example, we also specified pin colors and chose to use numbered icons.
<geopointe:StaticMap mapProvider=”goog” width=”500″ height=”300″ useIconLabels=”true” iconColor=”green” locationIDs=”a07A000000ATQjhIAH,a07A0000006O0qc,a07A0000006NKq2,Evanston|IL,OakPark|IL”/>

Lastly, we can change the image file type (png, gif, jpg) and get different map views (satellite, hybrid and terrain).
<geopointe:StaticMap mapProvider=”goog” width=”500″ height=”300″ useIconLabels=”true” iconColor=”green” locationIDs=”a07A000000ATQjhIAH,a07A0000006O0qc,a07A0000006NKq2,Evanston|IL,OakPark|IL” imageType=”png” mapType=”sat”/>

<geopointe:StaticMap mapProvider=”goog” width=”500″ height=”300″ useIconLabels=”true” iconColor=”green” locationIDs=”a07A000000ATQjhIAH,a07A0000006O0qc,a07A0000006NKq2,Evanston|IL,OakPark|IL” imageType=”png” mapType=”hyb”/>

<geopointe:StaticMap mapProvider=”goog” width=”500″ height=”300″ useIconLabels=”true” iconColor=”green” locationIDs=”a07A000000ATQjhIAH,a07A0000006O0qc,a07A0000006NKq2,Evanston|IL,OakPark|IL” imageType=”png” mapType=”ter”/>

We will add more and more over time such as routing and allowing for different colors and shapes per pin. For all that you can do, refer to the Component Reference below or in your Salesforce system.
| Attribute Name | Attribute Type | Description | Default Value |
|---|---|---|---|
| center | String | Defines the center for the map. If items are included in the locationIDs parameter, center is optional because the map will do a ‘bestFit’ process to figure out the optimum center and zoom. However, you can specify a value here to override that center point. For MapQuest, the override will only work if a zoom level is also provided. Acceptable values for this parameter are either a Salesforce record ID or a latitude, longitude pair (in the lat,lon format). If you are using Google, you can also use an address string (e.g. 150 N. Michigan Ave. Chicago, IL, 60601) to center the map. | |
| declutter | Boolean | Turning declutter on will spread out the icons on the map when they are overlapping each other. Acceptable values are true or false. If you do not specify a value, it will default to false. This parameter only applies to MapQuest maps. | false |
| height | Integer | The height, in pixels, of the map. If you do not specify a value, the map defaults to 400 pixels tall. MapQuest supports sizes of 50 – 2048 pixels, while Google supports sizes of 50 – 640 pixels. | 400 |
| iconColor | String | The color of the icon to use when plotting records in the locationIDs. Acceptable values for MapQuest are ‘blue’,'green’,'orange’,'purple’,'white’ or ‘yellow’. For Google, they are ‘black’, ‘brown’, ‘green’, ‘purple’, ‘yellow’, ‘blue’, ‘gray’, ‘orange’, ‘red’ or ‘white’. If you do not specify a value, it will default to ‘purple’ for MapQuest and ‘red’ for Google. | |
| imageType | String | The file format of the map image. Acceptable values are ‘jpg’,'jpeg’,'png’ or ‘gif’. If you do not specify a value, it will default to ‘png’. | png |
| locationIDs | String | A comma separated list of record IDs that correspond to the records that should be plotted on the map. The record IDs you include must be associated with Map Objects defined in Geopointe Setup and those records must have already been geocoded. If you do not include a center property, the map will perform a ‘bestFit’ around these points. If you set useIconLabels to true, the icons will be labeled in the order they are included in the locationIDs string (using numbers for MapQuest and letters for Google). With Google, you may also include address strings. Since the locations are being separated by commas, separate the address components with a | character. Using Google, an exmaple of the locationIDs parameter might be ’001A0000007dJxR,001A0000003uUWO,Wilmette|IL,Champaign|IL,San Francisco|CA,Orange|CA’. If you include addresses with MapQuest, they will be ignored. | |
| mapProvider | String | The map provider of the map image. Acceptable values are ‘default’ (obtains the value from your organization settings), ‘mq’ for MapQuest, ‘goog’ for Google or 'osm' for Open Street Map. If you do not specify a value, the mapping provider from your Organization Settings will be used. | default |
| mapType | String | The type of map to return. Acceptable values are ‘map’,'sat’,'hyb’ or ‘ter’ (map, satellite, hybrid or terrain, respectively). Only Google supports ‘ter’ (terrain maps). If you do not specify a value, it will default to ‘map’. | map |
| rendered | Boolean | A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. | true |
| useIconLabels | Boolean | Whether or not to label the icons when plotting the locationIDs Acceptable values are true or false. If you do not specify a value, it will default to false. MapQuest maps will use numbers as labels and Google maps will use capital letters. | false |
| width | Integer | The width, in pixels, of the map. If you do not specify a value, the map defaults to 400 pixels wide. MapQuest supports sizes of 50 – 2048 pixels, while Google supports sizes of 50 – 640 pixels. | 400 |
| zoom | Integer | The zoom level to use on the map. If items are included in the locationIDs parameter, zoom level is optional because the map will do a ‘bestFit’ process to figure out the optimum center and zoom. However, you can specify a value here to override that zoom level. To set the zoom, a center value must also be provided. Acceptable values for this parameter are Integers 1 (global view) through 16 (street view) for MapQuest or 0 (global view) through 21 (street view) for Google. |