6.0.1 • Published 3 months ago

@ng-maps/core v6.0.1

Weekly downloads
90
License
MIT
Repository
github
Last release
3 months ago

@ng-maps/core

@ng-maps/core is a simple, modular and tree-shakable library for displaying google-maps inside an angular application

Installation

  • Npm: npm install @ng-maps/core
  • Yarn: yarn add @ng-maps/core

Then you will need to install typings for google maps as a dev dependency

  • Npm: npm install -D @types/google.maps
  • Yarn: yarn add -D @types/google.maps

Add NgMapsCoreModule to your AppModule.

Additionally, you will need to add the @ng-maps/google module and follow the instruction there. As alternative there is a here maps module which isn't ready for production yet.

Lazy loading configuration

If you can not provide configuration at module import level you can load it at a later time.

You just need to inject MapsAPILoader into a component or service and call the method configure(config) with a valid configuration.

Usage

Simple Map

Add the map to your components template

<map-view [latitude]="48.858222" [longitude]="2.2945" [zoom]="8"></map-view>

Add a height to your components CSS, for example

map-view {
  height: 300px;
}

Input options

NameTypeValuesDescription
longitudeNumber
latitudeNumber
minZoomNumber
maxZoomNumber
zoomNumberBetween 0 and MaxZoom, typically 18
fitBoundsLatLngBoundsLiteral, LatLngBounds or BooleanIf set to true attaches to mapFitBounds directives on <map-marker>
mapTypeIdroadmap, hybrid, satellite, terrain
layersArray or StringTrafficLayer or TransitLayer or BicyclingLayerActivates layer as described in TrafficLayer Documentation

Marker

Additionally you can add markers

<map-view [latitude]="48.858222" [longitude]="2.2945" [zoom]="8">
  <map-marker [latitude]="48.858222" [longitude]="2.2945"></map-marker>
</map-view>

Input options

NameTypeValuesDescription
longitudeNumber
latitudeNumber

Outputs

NameValueDescription
markerClickComponent

Additional features

Other features are provided in submodules. Find out more on the project page at github

6.0.1

3 months ago

6.0.0

3 months ago

5.0.3

10 months ago

5.0.2

11 months ago

5.0.1

11 months ago

5.0.0

12 months ago

4.0.3

12 months ago

4.0.2

12 months ago

4.0.1

1 year ago

4.0.0

1 year ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.2.0

2 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

4 years ago

2.0.0-alpha.10

4 years ago

2.0.0-alpha.9

4 years ago

2.0.0-alpha.7

4 years ago

2.0.0-alpha.8

4 years ago

2.0.0-alpha.6

4 years ago

2.0.0-alpha.5

4 years ago

2.0.0-alpha.4

4 years ago

2.0.0-alpha.3

4 years ago

2.0.0-alpha.1

4 years ago

2.0.0-alpha.2

4 years ago

1.1.0

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago