Angular8-yandex-maps
Angular 6+ module for Yandex.Maps
If you liked the project and want to support the development please star the package on GitHub page. Thanks!
Examples
Installation
npm install angular8-yandex-maps
Usage
module.ts
import { AngularYandexMapsModule } from 'angular8-yandex-maps';
@NgModule({
imports: [AngularYandexMapsModule.forRoot(API_KEY or null)]
})
component.html
<div class="map">
<angular-yandex-map [center]="[55.751952, 37.600739]" [zoom]="12">
<angular-yandex-placemark [geometry]="[55.751952, 37.600739]"></angular-yandex-placemark>
</angular-yandex-map>
</div>
component.css
.map {
width: 1000px;
height: 500px;
}
Map
Inputs
Name | Type | Default | Required | Description |
---|
center | Number[] | | yes | Map center geocoordinates |
zoom | Number | 10 | no | Map zoom level |
state | MapState | | no | States for the map |
options | MapOptions | | no | Options for the map |
clusterer | Clusterer | | no | Options for the Clusterer. Clusters ONLY Placemarks in the visible area of the map. |
<angular-yandex-map [center]="[55.751952, 37.600739]" [zoom]="12" [state]="{type: 'yandex#satellite'}"></angular-yandex-map>
Placemark
Inputs
<angular-yandex-placemark [geometry]="[55.751952, 37.600739]" [properties]="{iconCaption: 'Moscow'}"></angular-yandex-placemark>
MultiRoute
Inputs
<angular-yandex-multiroute [referencePoints]="[[55.751952, 37.600739], 'Красные ворота, Москва']" [options]="{routeActiveStrokeColor: 'ff0000'}"></angular-yandex-multiroute>
GeoObject
Inputs
<angular-yandex-geoobject [feature]="{ geometry: { type: 'Rectangle', coordinates: [[55.665, 37.66], [55.64,37.53]] } }"></angular-yandex-geoobject>
Search
Inputs
<angular-yandex-search [parameters]="{ options: { float: 'right' } }"></angular-yandex-search>
Changelog
CHANGELOG
License
MIT