@@ -124,30 +124,34 @@ Using this package, you can use spatial fields in Laravel Nova.
124124
125125## Map Field Methods
126126
127- | method | Arguments | description |
128- |-----------------------------|------------------------------------------|---------------------------------------------------------------------------------|
129- | defaultLatitude | latitude <br> ` float` | Specifies latitude of map on page load |
130- | defaultLongitude | longitude < br> ` float` | Specifies longitude of map on page load |
131- | zoom | zoom < br> ` integer` | Specifies default map zoom |
132- | withoutZoomControl | status < br> ` bool` ` default: true` | Specifies whether zoom in/out button should display on map or not |
133- | withoutZoomSlider | status < br> ` bool` ` default: true` | Specifies whether zoom slider should display on map or not |
134- | withFullScreenControl | status < br> ` bool` ` default: true` | Specifies whether full screen button should display on map or not |
135- | mapHeight | height < br> ` integer` ` default: 400` | Map' s height |
136- | hideDetailButton | status <br> `bool` `default: true` | Specifies whether **Show Details** button should appear on detail pages or not |
137- | markerIcon | icon <br> `integer` `available: 1, 2, 3` | Marker icon |
138- | withSearchBox | `boolean` | Specifies whether map has search box or not |
139- | searchProvider | provider `MapSearchProvider` | |
140- | searchProviderApiKey | apiKey `string` | Specifies api key for search provider, if needed |
141- | withAutocompleteSearch | status `bool` `default: true` | Specifies whether search results should load immediately or not |
142- | searchAutocompleteMinLength | minLength `int` | Specifies the minimum number of characters to trigger search action |
143- | searchAutocompleteTimeout | timeout `int` | Specifies the minimum number of ms to wait before triggering search action |
144- | searchLanguage | language `string` | Specifies preferable language |
145- | searchPlaceholder | placeholder `string` | |
146- | searchBoxType | type `MapSearchBoxType` | Using this item, you can specify type of search box (button, or text-field |
147- | searchResultLimit | limit `int` | Specifies limit of results |
148- | searchResultKeepOpen | status `boolean` | Specifies whether the results keep opened |
149- | requiredOnCreate | status <br> `bool` `default: true` | Makes field required on creation |
150- | requiredOnUpdate | status <br> `bool` `default: true` | Makes field required on update |
127+ | method | Arguments | description |
128+ |-----------------------------|------------------------------------------|--------------------------------------------------------------------------------|
129+ | defaultLatitude | latitude <br> ` float` | Specifies latitude of map on page load |
130+ | defaultLongitude | longitude < br> ` float` | Specifies longitude of map on page load |
131+ | zoom | zoom < br> ` integer` | Specifies default map zoom |
132+ | withoutZoomControl | status < br> ` bool` ` default: true` | Specifies whether zoom in/out button should display on map or not |
133+ | withoutZoomSlider | status < br> ` bool` ` default: true` | Specifies whether zoom slider should display on map or not |
134+ | withFullScreenControl | status < br> ` bool` ` default: true` | Specifies whether full screen button should display on map or not |
135+ | mapHeight | height < br> ` integer` ` default: 400` | Map' s height |
136+ | hideDetailButton | status <br> `bool` `default: true` | Specifies whether **Show Details** button should appear on detail pages or not |
137+ | markerIcon | icon <br> `integer` `available: 1, 2, 3` | Marker icon |
138+ | withSearchBox | `boolean` | Specifies whether map has search box or not |
139+ | searchProvider | provider `MapSearchProvider` | |
140+ | searchProviderApiKey | apiKey `string` | Specifies api key for search provider, if needed |
141+ | withAutocompleteSearch | status `bool` `default: true` | Specifies whether search results should load immediately or not |
142+ | searchAutocompleteMinLength | minLength `int` | Specifies the minimum number of characters to trigger search action |
143+ | searchAutocompleteTimeout | timeout `int` | Specifies the minimum number of ms to wait before triggering search action |
144+ | searchLanguage | language `string` | Specifies preferable language |
145+ | searchPlaceholder | placeholder `string` | |
146+ | searchBoxType | type `MapSearchBoxType` | Using this item, you can specify type of search box (button, or text-field |
147+ | searchResultLimit | limit `int` | Specifies limit of results |
148+ | searchResultKeepOpen | status `boolean` | Specifies whether the results keep opened |
149+ | withTransformation | status `boolean` | Specifies whether transport feature should be enable on polygons |
150+ | transformScale | status `boolean` | Using this method, you can enable/disable scaling features |
151+ | transformRotate | status `boolean` | Using this method, you can enable/disable rotating features |
152+ | transformStretch | status `boolean` | Using this method, you can enable/disable stretch option |
153+ | requiredOnCreate | status <br> `bool` `default: true` | Makes field required on creation |
154+ | requiredOnUpdate | status <br> `bool` `default: true` | Makes field required on update |
151155
152156
153157## Config Properties
@@ -166,14 +170,18 @@ Using this package, you can use spatial fields in Laravel Nova.
166170| search.enable | bool | true | Using this item, you can toggle displaying search box on maps |
167171| search.provider | MapSearchProvider | OSM | Specifies search provider available providers: `OSM, MAPQUEST, PHOTON, PELIAS, BING, OPENCAGE` |
168172| search.api-key | string | ' ' | Specifies API key if required |
169- | search.autocomplete | boolean | false | Using this item, you can toggle autocomplete feature for search box |
173+ | search.autocomplete | bool | false | Using this item, you can toggle autocomplete feature for search box |
170174| search.autocomplete-min-length | int | 2 | The minimum number of characters to trigger search |
171175| search.autocomplete-timeout | int | 200 | The minimum number of ms to wait before triggering search action |
172176| search.language | string | en-US | Specifies preferable language |
173177| search.placeholder | string | Search for an address | Specifies placeholder for text input |
174178| search.box-type | MapSearchBoxType | TEXT_FIELD | Specifies type of search box. available types: `BUTTON, TEXT_FIELD` |
175179| search.limit | int | 5 | Specifies limit of results |
176- | search.keep-open | boolean | false | Specifies whether the results keep opened |
180+ | search.keep-open | bool | false | Specifies whether the results keep opened |
181+ | transform.enable | bool | true | Using this item, you can toggle transforming polygons maps |
182+ | transform.scale | bool | true | Using this property, you can toggle scaling features |
183+ | transform.scale | bool | true | Using this property, you can toggle rotating features |
184+ | transform.stretch | bool | true | Using this property, you can enable/disable stretch option |
177185
178186----
179187
@@ -183,6 +191,20 @@ This package uses [Laravel Eloquent Spatial](https://github.com/MatanYadaev/lara
183191
184192----
185193
194+ ## Tricks
195+
196+ ### Transform Polygons
197+
198+ To transform polygons, You should press `Alt` (Option `⌥`) button and drag that polygon everywhere you want.
199+
200+ ### Select Polygons
201+
202+ To select polygons (and modify them), You can press `Shift` button and then click on the polygon.
203+ By pressing the `Shift` key, drawing mode will be disabled and you can
204+ select every polygon you want.
205+
206+ ----
207+
186208## Complete Example
187209```php
188210<?php
0 commit comments