This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
You can install the package via composer:
composer require postare/gis-tools
You MUST publish assets with:
php artisan vendor:publish --tag="gis-tools-assets"
You can publish and run the migrations with:
php artisan vendor:publish --tag="gis-tools-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="gis-tools-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="gis-tools-views"
This is the contents of the published config file:
return [
];
// Form field
Map::make('location')
->height(500) // Altezza della mappa in px
->showCoordinates() // Mostra un overlay con le coordinate del punto
// Per definire il punto di partenza
->default([
'type' => 'Point',
'coordinates' => [
41.72, // lng
13.34, // lat
],
])
// Per definire le tile da utilizzare
// Se non specificato, usa OpenStreetMap, altrimenti una o più tile a scelta.
// Una lista la puoi trovare qui: https://leaflet-extras.github.io/leaflet-providers/preview/
->tiles([
[
'name' => 'OpenStreetMap',
'url' => 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
'options' => [
'maxZoom' => 19,
'attribution' => 'Map data: © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
],
],
[
'name' => 'OpenTopoMap',
'url' => 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
'options' => [
'maxZoom' => 17,
'attribution' => 'Map data: © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)',
],
],
[
'name' => 'Esri World Imagery',
'url' => 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
'options' => [
'attribution' => '© ESRI',
],
]
])
// Per definire il marker, altrimenti usa quello di default
->markerIcon([
'iconUrl' => 'https://mapmarker.io/api/v3/font-awesome/v6/pin?icon=fa-solid%20fa-star&size=60&color=FFF&background=990099&hoffset=0&voffset=0',
'iconSize' => [60, 60],
'iconAnchor' => [30, 60],
])
->required(),
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.