About custom map icons or markers
There are three ways to use custom map marker icons on your Map Views:
- Select a default marker icon in the Maps settings to be used for all entries (unless overridden by a choice-based marker)
- Select a different map marker based on a field value in the entry (choice-based markers)
- Add a field to your form allowing users to select their own custom marker
Below, we will look at each of these three options in more detail.
1. Selecting a default marker icon in the Maps settings
The default marker icon will be used for all entries in your View, unless it's overridden by a choice-based marker (more on this below). To select a default marker icon, edit your View, scroll down to the View settings and click on the "Maps" tab on the left. Next to the "Default Pin Icon" option, click the button that says "Select Icon" to choose from one of the custom map markers that GravityView adds by default. If you want to upload your own icon image, click "Add Icon".
2. Associate map markers to entry field values
You also have the option to display a different map marker depending on a field value in the entry. Here's an example: You have a business directory where each listing is categorized by "industry" and you want to display a different map marker for each industry. It's important to know that this option only works for Gravity Forms Select fields like a Drop Down or Radio Buttons field.
To learn more about associating a custom map marker icon to a field value, read this article.
3. Allow users to select their own map marker icon
The GravityView Maps layout adds a new field to Gravity Forms, allowing users to select a custom map marker icon as part of their submission. To add this field to your form, click on the "Add Fields" tab in the Gravity Forms editor, open the "GravityView" toggle and select the "Map Icon Picker" field.
Now when users are filling in your form, they will have the option to select a custom map marker icon to be associated with their entry.