angular8-yandex-maps
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "angular8-yandex-maps", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Angular module for Yandex Maps", | ||
@@ -5,0 +5,0 @@ "repository": { |
103
README.md
@@ -0,62 +1,111 @@ | ||
# Angular8-yandex-maps | ||
[Example](https://github.com/ddubrava/angular-yandex-maps/tree/develop/src/app) | ||
## Установка | ||
## Installation | ||
```bash | ||
npm install angular8-yandex-maps | ||
``` | ||
## Использование | ||
## Usage | ||
### module.ts | ||
``` | ||
import { AngularYandexMapsModule } from 'angular8-yandex-maps'; | ||
@NgModule({ | ||
imports: [ | ||
AngularYandexMapsModule.forRoot(API_KEY or null) | ||
] | ||
imports: [AngularYandexMapsModule.forRoot(API_KEY or null)] | ||
}) | ||
``` | ||
### component.html | ||
``` | ||
<angular-yandex-map | ||
class="yandex-map__map" | ||
[mapState]="mapState" | ||
[mapOptions]="mapOptions" | ||
></angular-yandex-map> | ||
<div class="map"> | ||
<angular-yandex-map [center]="[60.169931, 24.938513]" [zoom]="12" [mapOptions]="mapOptions"> | ||
<angular-yandex-placemark [geometry]="[60.169931, 24.938513]"></angular-yandex-placemark> | ||
<angular-yandex-placemark [geometry]="[60.170817, 24.945757]"></angular-yandex-placemark> | ||
</angular-yandex-map> | ||
</div> | ||
``` | ||
### component.scss | ||
### component.css | ||
``` | ||
.yandex-map { | ||
&__map { | ||
width: 1000px; | ||
height: 500px; | ||
} | ||
.map { | ||
width: 1000px; | ||
height: 500px; | ||
} | ||
``` | ||
### component.ts | ||
``` | ||
import { YandexMapModule } from 'angular8-yandex-maps'; | ||
public mapState: YandexMapModule.IYandexMapState = { | ||
center: [60.169931, 24.938513], | ||
zoom: 13 | ||
}; | ||
import { YandexMapModule } from 'angular8-yandex-maps'; | ||
public mapOptions: YandexMapModule.IYandexMapOptions = { | ||
maxZoom: 15 | ||
}; | ||
public mapOptions: YandexMapModule.IYandexMapOptions = { | ||
maxZoom: 12 | ||
}; | ||
``` | ||
## Версия 0.1.1 | ||
- Реализована поддержка карты | ||
- Реализована поддержка Map.state, Map.options ([Документация](https://tech.yandex.ru/maps/jsapi/doc/2.1/ref/reference/Map-docpage/)) | ||
## Version 0.2 | ||
- Placemark is added | ||
- Inputs for yandex-map is changed | ||
## Map | ||
Available inputs: | ||
- center: Array<number> | ||
- zoom: number | ||
- mapState: [Interface](%5BMap%5D%28https://tech.yandex.ru/maps/jsapi/doc/2.1/ref/reference/Map-docpage/%29) | ||
- mapOptions: [Interface](%5BMap%5D%28https://tech.yandex.ru/maps/jsapi/doc/2.1/ref/reference/Map-docpage/%29) | ||
``` | ||
<angular-yandex-map [center]="[60.169931, 24.938513]" [zoom]="12" [mapOptions]="mapOptions" [mapState]="{margin: 20}"></angular-yandex-map> | ||
``` | ||
## Placemark | ||
Available inputs: | ||
- geometry: Array<number> | ||
``` | ||
<angular-yandex-placemark [geometry]="[60.170817, 24.945757]"></angular-yandex-placemark> | ||
``` | ||
## License | ||
[MIT](https://github.com/ddubrava/angular-yandex-maps/blob/develop/LICENSE.md) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138183
111