Map Icons

An icon font for use with Google Maps API and Google Places API using SVG markers and icon labels

Download GitHub

Version 3.0.2 · @map_icons · Created & Maintained by @scottdejonge

Map Icons makes Google Maps Markers dynamic with control over shape, color, size, and icon easily changed using options in the marker object as well as simple SVG Notation and CSS.

Made for Google

Plug in and play immediately with Google Maps and Google Places.

CSS Control

Easily style icon color, size, shadow, and anything that's possible with CSS.

Infinite Scalability

Scalable vector graphics means every icon looks awesome at any size.

Retina Ready

Vector icons look sharp on any display at any resolution.

Over 175 Icons and Counting

One font, lots and lots of icons to choose from.

Accessibility Icons

Icons for accessibility using an accessible web format, icon fonts.

Icons

General

Toilets

Food

Stores

Activities

Land Activities

Water Activities

Winter Activities

Transport

Health

Entertainment

Services

Business

Government

Religious

Accessibility

User Interface

Marker Icons

Markers

MAP_PIN

M0-48c-9.8 0-17.7 7.8-17.7 17.4 0 15.5 17.7 30.6 17.7 30.6s17.7-15.4 17.7-30.6c0-9.6-7.9-17.4-17.7-17.4z

SQUARE_PIN

M22-48h-44v43h16l6 5 6-5h16z

SHIELD

M18.8-31.8c.3-3.4 1.3-6.6 3.2-9.5l-7-6.7c-2.2 1.8-4.8 2.8-7.6 3-2.6.2-5.1-.2-7.5-1.4-2.4 1.1-4.9 1.6-7.5 1.4-2.7-.2-5.1-1.1-7.3-2.7l-7.1 6.7c1.7 2.9 2.7 6 2.9 9.2.1 1.5-.3 3.5-1.3 6.1-.5 1.5-.9 2.7-1.2 3.8-.2 1-.4 1.9-.5 2.5 0 2.8.8 5.3 2.5 7.5 1.3 1.6 3.5 3.4 6.5 5.4 3.3 1.6 5.8 2.6 7.6 3.1.5.2 1 .4 1.5.7l1.5.6c1.2.7 2 1.4 2.4 2.1.5-.8 1.3-1.5 2.4-2.1.7-.3 1.3-.5 1.9-.8.5-.2.9-.4 1.1-.5.4-.1.9-.3 1.5-.6.6-.2 1.3-.5 2.2-.8 1.7-.6 3-1.1 3.8-1.6 2.9-2 5.1-3.8 6.4-5.3 1.7-2.2 2.6-4.8 2.5-7.6-.1-1.3-.7-3.3-1.7-6.1-.9-2.8-1.3-4.9-1.2-6.4z

ROUTE

M24-28.3c-.2-13.3-7.9-18.5-8.3-18.7l-1.2-.8-1.2.8c-2 1.4-4.1 2-6.1 2-3.4 0-5.8-1.9-5.9-1.9l-1.3-1.1-1.3 1.1c-.1.1-2.5 1.9-5.9 1.9-2.1 0-4.1-.7-6.1-2l-1.2-.8-1.2.8c-.8.6-8 5.9-8.2 18.7-.2 1.1 2.9 22.2 23.9 28.3 22.9-6.7 24.1-26.9 24-28.3z

SQUARE

M-24-48h48v48h-48z

SQUARE_ROUNDED

M24-8c0 4.4-3.6 8-8 8h-32c-4.4 0-8-3.6-8-8v-32c0-4.4 3.6-8 8-8h32c4.4 0 8 3.6 8 8v32z

Usage

Map Icons extends the Google Maps Marker Object to enable either an image or SVG marker to be used with the icon placed on top as a label.

Include

Include the fonts in the dist/font directory as well as the dist/css/map-icons.css stylesheet to use icons in markup as an icon font.

To use the icons with Google Maps include dist/js/map-icons.js

Classes

Icon class names are to be used with the map-icon class prefix.

<span class="map-icon map-icon-point-of-interest"></span>

Styling the Icon

Styles to icons can be applied with the .map-icon CSS selector.

.map-icon {
	...
}

Explicit styles to icons being used on a Google Map should be applied with .map-icon-label .map-icon CSS selector.

.map-icon-label .map-icon {
	font-size: 24px;
	color: #FFFFFF;
	line-height: 48px;
	text-align: center;
	white-space: nowrap;
}

Creating a Marker

Markers are created just like a normal Google Maps Marker, however, the class is extended for the map_icon_label property to add in markup for marker labels.

Note: You should be creating an instance of Marker rather than google.maps.Marker in order for the functionality added by map_icon_label to work.

var marker = new Marker({
	map: map,
	position: new google.maps.LatLng(-27.46577, 153.02303),
	icon: {
		path: SQUARE_PIN,
		fillColor: '#00CCBB',
		fillOpacity: 1,
		strokeColor: '',
		strokeWeight: 0
	},
	map_icon_label: '<span class="map-icon map-icon-point-of-interest"></span>'
});

License

Font License

Applies to font files inside: dist directory.

Map Icons licensed under SIL OFL 1.1

Code License

Applies to code inside: dist directory.

Code licensed under MIT License

Documentation License

Applies to files not a part of other licenses.

Documentation licensed under CC BY 3.0