JSPM

google-maps-icons

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q21767F
  • License MIT

A simple helper library that references all Google Maps Icons

Package Exports

  • google-maps-icons

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (google-maps-icons) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Google Map Icons

npm version

DEMO SITE HERE

Important note: this project is not an official Google Project, and is provided "as is".

Overview

This project provides all Google Map Icons, in a simple way.

Installation

npm install google-maps-icons

or

yarn add google-maps-icons

Usage

####Simple

import googleMapIcon, { CONSTELLATION_STAR } from "google-maps-icons";
const iconUrl = googleMapIcon(CONSTELLATION_STAR);

will return:

https://www.google.com/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet_outline_v2-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/constellation_star_pinlet-1-small.png&highlight=ff000000,ffffff,fbc02d,ffffff?scale=1

With options

import googleMapIcon from "google-maps-icons";
const options = {scale: 2, color: "800000"};
const iconUrl = googleMapIcon("parking", options);

will return:

https://www.google.com/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet_outline_v2-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/parking_pinlet-1-small.png&highlight=ff000000,ffffff,800000,ffffff?scale=2

Argument & Options

Argument:

  • icon: a valid string among the following ones: dot, nickname, heart, constellation_star, home, generic, gas, parking, car_rental, lodging, resort, bank_euro, bank_dollar, bank_jp, atm, bank_intl, hospital_H, hospital_shield, pharmacy, fire_jp, medical, tree, mountain, stadium, paw, camping, cemetery, golf, flower, hiking, boating, fishing, hotspring, airport, restaurant, bar, cafe, glass, shoppingbag, shoppingcart, palette, lighthouse, theater, camera, dice, dolphin, event_venue, ferriswheel, historic, historic_cn, museum, movie, monument, note, relic_jp, civic_bldg, postoffice, postoffice_jp, library, police, police_jp, school, school_cn_jp, bridge, restroom, city_office_jp, civil_office_jp, government_cn, worship_temple, worship_jewish, worship_mormon, worship_dharma, worship_buddhist, worship_hindu, worship_jain, worship_shinto, worship_sikh, worship_islam

Options:

  • scale: Number, from 1 to 4. Default is 1.
  • color: hexa color, without the hashtag. Default is the one provided by Google.

[Blog Google] Google Maps gets a new look [Google Spreadsheets] Iconos de Google Maps