This commit is contained in:
Emanuel Mutschlechner
2018-08-30 01:21:38 +02:00
commit c7c7694ac4
32 changed files with 23196 additions and 0 deletions

65
README.md Normal file
View File

@@ -0,0 +1,65 @@
Publish assets to `public/vendor/maps/{css,js}`
```bash
php artisan vendor:publish --provider="GoNoWare\Maps\MapsServiceProvider" --tag=maps
```
Publish config to `config/vendor/maps.php`
```bash
php artisan vendor:publish --provider="GoNoWare\Maps\MapsServiceProvider" --tag=config
```
Add styles to `</head>`
```php
@mapstyles
```
Add scripts before `</body>`
```php
@mapscripts
```
Show map
```php
@map([
'lat' => '51',
'lng' => '0',
'zoom' => '5',
])
```
Show map with one marker
```php
@map([
'lat' => '51',
'lng' => '0',
'zoom' => '5',
'markers' => [[
'lat' => '51',
'lng' => '0',
]],
])
```
Show map with two markers
```php
@map([
'lat' => '48.134664',
'lng' => '11.555220',
'zoom' => '13',
'markers' => [[
'lat' => '48.134664',
'lng' => '11.555220',
], [
'lat' => 11,
'lng' => 11,
]],
])
```
Adjust map height
```css
.map-container {
height: 500px;
}
```