Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ngx-us-map

bharat201853MIT1.0.0TypeScript support: included

Angular 4+ US SVG Map

angular, us map, svg map, angular us map

readme

Angular SVG US Map

This package is used to generate US SVG Map and also giving ability to set callback function and some parameters to change fill & stocke color.

usmap

How to install

npm install angular-us-map

Configuration

app.module.ts

import { UsMapModule } from 'angular-us-map';

You need to add this module in @NgModule(Imports). That's it.

Accessing Component

<us-map></us-map>

API Reference

Inputs

||| |-|-| | fillColor | Type: string Optional. Will change color of state name text | | fillStateColor | Type: string Optional. Will change background color of state area | | strokeColor | Type: string Optional. Will change border color of state area |

Output

||| |-|-| | onMapClick | Will be emitted when state area has been clicked. It returns state abbr. (onMapClick) event. |

Moreover, you can apply your own css to beautify this component.