Customizing a map marker

The image below displays a Google maps marker with the default red icon.
You can change this icon to an image of your choice. The table below explains
the code that customizes the default marker to use an icon for parking lots.

Adds the icon property to the MarkerOptions object, to
change the marker’s icon.
The icon property can be either a string (the URL to the marker
icon), or an Icon object.
See the customized marker icon below.

Customizing markers by map features

Each point of interest in the list of campus features has a type
attribute. Notice how the code extract below specifies the parking, library
and info types. You can customize the marker icon depending on the map
feature type you set it to.