Two commit
This commit is contained in:
55
docker-compose.yaml
Normal file
55
docker-compose.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: "nginx:stable-alpine"
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ./src:/var/www/laravel
|
||||
depends_on:
|
||||
- php
|
||||
- postgresql
|
||||
- nominatim
|
||||
php:
|
||||
build:
|
||||
context: dockerfiles
|
||||
dockerfile: php.Dockerfile
|
||||
volumes:
|
||||
- ./src:/var/www/laravel
|
||||
nominatim:
|
||||
image: mediagis/nominatim:4.4
|
||||
container_name: nominatim_server
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:8080"
|
||||
environment:
|
||||
PBF_PATH: /nominatim/data/my_data.osm.pbf
|
||||
NOMINATIM_PBF_PATH: /nominatim/data/my_data.osm.pbf
|
||||
volumes:
|
||||
- ./my_data.osm.pbf:/nominatim/data/my_data.osm.pbf
|
||||
- ./nominatim_data:/var/lib/postgresql/data
|
||||
postgresql:
|
||||
image: "postgis/postgis:17-3.5-alpine"
|
||||
ports:
|
||||
- "5433:5432"
|
||||
env_file:
|
||||
- env/postgres.env
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
composer:
|
||||
build:
|
||||
context: dockerfiles
|
||||
dockerfile: composer.Dockerfile
|
||||
volumes:
|
||||
- ./src:/var/www/laravel
|
||||
artisan:
|
||||
build:
|
||||
context: dockerfiles
|
||||
dockerfile: php.Dockerfile
|
||||
volumes:
|
||||
- ./src:/var/www/laravel
|
||||
entrypoint: ["php", "/var/www/laravel/artisan"]
|
||||
volumes:
|
||||
db_data:
|
||||
5
dockerfiles/composer.Dockerfile
Normal file
5
dockerfiles/composer.Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM composer:latest
|
||||
|
||||
WORKDIR /var/www/laravel
|
||||
|
||||
ENTRYPOINT ["composer", "--ignore-platform-reqs"]
|
||||
7
dockerfiles/php.Dockerfile
Normal file
7
dockerfiles/php.Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM php:8.2-fpm-alpine
|
||||
|
||||
WORKDIR /var/www/laravel
|
||||
|
||||
RUN apk add --no-cache postgresql-dev \
|
||||
&& docker-php-ext-install pdo pdo_pgsql pgsql
|
||||
RUN chown -R www-data:www-data /var/www/laravel
|
||||
4
env/postgres.env
vendored
Normal file
4
env/postgres.env
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
POSTGRES_DATABASE=pp
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_ROOT_PASSWORD=postgres
|
||||
BIN
my_data.osm.pbf
Normal file
BIN
my_data.osm.pbf
Normal file
Binary file not shown.
18
nginx/nginx.conf
Normal file
18
nginx/nginx.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 80;
|
||||
index index.php index.html;
|
||||
server_name localhost;
|
||||
root /var/www/laravel/public;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
18
src/.editorconfig
Normal file
18
src/.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[compose.yaml]
|
||||
indent_size = 4
|
||||
65
src/.env.example
Normal file
65
src/.env.example
Normal file
@@ -0,0 +1,65 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
APP_LOCALE=en
|
||||
APP_FALLBACK_LOCALE=en
|
||||
APP_FAKER_LOCALE=en_US
|
||||
|
||||
APP_MAINTENANCE_DRIVER=file
|
||||
# APP_MAINTENANCE_STORE=database
|
||||
|
||||
# PHP_CLI_SERVER_WORKERS=4
|
||||
|
||||
BCRYPT_ROUNDS=12
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_STACK=single
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
# DB_HOST=127.0.0.1
|
||||
# DB_PORT=3306
|
||||
# DB_DATABASE=laravel
|
||||
# DB_USERNAME=root
|
||||
# DB_PASSWORD=
|
||||
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
SESSION_ENCRYPT=false
|
||||
SESSION_PATH=/
|
||||
SESSION_DOMAIN=null
|
||||
|
||||
BROADCAST_CONNECTION=log
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=database
|
||||
|
||||
CACHE_STORE=database
|
||||
# CACHE_PREFIX=
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_CLIENT=phpredis
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=log
|
||||
MAIL_SCHEME=null
|
||||
MAIL_HOST=127.0.0.1
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
11
src/.gitattributes
vendored
Normal file
11
src/.gitattributes
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
* text=auto eol=lf
|
||||
|
||||
*.blade.php diff=html
|
||||
*.css diff=css
|
||||
*.html diff=html
|
||||
*.md diff=markdown
|
||||
*.php diff=php
|
||||
|
||||
/.github export-ignore
|
||||
CHANGELOG.md export-ignore
|
||||
.styleci.yml export-ignore
|
||||
24
src/.gitignore
vendored
Normal file
24
src/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
*.log
|
||||
.DS_Store
|
||||
.env
|
||||
.env.backup
|
||||
.env.production
|
||||
.phpactor.json
|
||||
.phpunit.result.cache
|
||||
/.fleet
|
||||
/.idea
|
||||
/.nova
|
||||
/.phpunit.cache
|
||||
/.vscode
|
||||
/.zed
|
||||
/auth.json
|
||||
/node_modules
|
||||
/public/build
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/storage/pail
|
||||
/vendor
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
Thumbs.db
|
||||
59
src/README.md
Normal file
59
src/README.md
Normal file
@@ -0,0 +1,59 @@
|
||||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
|
||||
</p>
|
||||
|
||||
## About Laravel
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||
|
||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||
|
||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||
|
||||
## Learning Laravel
|
||||
|
||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. You can also check out [Laravel Learn](https://laravel.com/learn), where you will be guided through building a modern Laravel application.
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
|
||||
|
||||
### Premium Partners
|
||||
|
||||
- **[Vehikl](https://vehikl.com)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Curotec](https://www.curotec.com/services/technologies/laravel)**
|
||||
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
|
||||
- **[Redberry](https://redberry.international/laravel-development)**
|
||||
- **[Active Logic](https://activelogic.com)**
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
8
src/app/Http/Controllers/Controller.php
Normal file
8
src/app/Http/Controllers/Controller.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
abstract class Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
64
src/app/Http/Controllers/MapController.php
Normal file
64
src/app/Http/Controllers/MapController.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use App\Models\Svod_camer;
|
||||
|
||||
class MapController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
// Центр (Сыктывкар по умолчанию)
|
||||
$lat = 61.664;
|
||||
$lon = 50.816;
|
||||
$zoom = 12;
|
||||
$displayName = null;
|
||||
|
||||
$searchQuery = $request->input('q');
|
||||
|
||||
// Обработка поиска по адресу через Nominatim
|
||||
if ($searchQuery) {
|
||||
$response = Http::withHeaders(['User-Agent' => 'MyLaravelApp/1.0'])
|
||||
->get("http://nominatim:8080/search", [
|
||||
'format' => 'json',
|
||||
'q' => $searchQuery,
|
||||
'limit' => 1
|
||||
]);
|
||||
|
||||
if ($response->successful() && !empty($response->json())) {
|
||||
$data = $response->json()[0];
|
||||
$lat = $data['lat'];
|
||||
$lon = $data['lon'];
|
||||
$zoom = 16;
|
||||
$displayName = $data['display_name'];
|
||||
}
|
||||
}
|
||||
|
||||
$svod_camer = Svod_camer::find(2);
|
||||
$svod_camer_name = $svod_camer ? $svod_camer->name : 'Камера не выбрана';
|
||||
|
||||
return view('map', compact('lat', 'lon', 'zoom', 'displayName', 'svod_camer_name'));
|
||||
}
|
||||
|
||||
public function getInBounds(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'sw_lat' => 'required|numeric',
|
||||
'sw_lng' => 'required|numeric',
|
||||
'ne_lat' => 'required|numeric',
|
||||
'ne_lng' => 'required|numeric',
|
||||
]);
|
||||
$cameras = \DB::table('svod_camers')->whereRaw("
|
||||
geom && ST_MakeEnvelope(?, ?, ?, ?, 4326)
|
||||
", [
|
||||
(float)$request->sw_lng,
|
||||
(float)$request->sw_lat,
|
||||
(float)$request->ne_lng,
|
||||
(float)$request->ne_lat
|
||||
])->get();
|
||||
|
||||
return response()->json($cameras);
|
||||
}
|
||||
}
|
||||
12
src/app/Models/Svod_camer.php
Normal file
12
src/app/Models/Svod_camer.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Svod_camer extends Model
|
||||
{
|
||||
protected $table = 'svod_camers';
|
||||
public $timestamps = false;
|
||||
protected $fillable = ['id', 'mo', 'adress', 'name', 'ing', 'lat', 'prog', 'videoanal', 'status_function', 'vyvod_mvd', 'vyvod_edds', 'srok_hranenia'];
|
||||
}
|
||||
48
src/app/Models/User.php
Normal file
48
src/app/Models/User.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
}
|
||||
24
src/app/Providers/AppServiceProvider.php
Normal file
24
src/app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
18
src/artisan
Normal file
18
src/artisan
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Application;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
// Register the Composer autoloader...
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
|
||||
// Bootstrap Laravel and handle the command...
|
||||
/** @var Application $app */
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
||||
$status = $app->handleCommand(new ArgvInput);
|
||||
|
||||
exit($status);
|
||||
BIN
src/bd_bg_2
Normal file
BIN
src/bd_bg_2
Normal file
Binary file not shown.
18
src/bootstrap/app.php
Normal file
18
src/bootstrap/app.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
|
||||
return Application::configure(basePath: dirname(__DIR__))
|
||||
->withRouting(
|
||||
web: __DIR__.'/../routes/web.php',
|
||||
commands: __DIR__.'/../routes/console.php',
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware): void {
|
||||
//
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions): void {
|
||||
//
|
||||
})->create();
|
||||
2
src/bootstrap/cache/.gitignore
vendored
Normal file
2
src/bootstrap/cache/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
5
src/bootstrap/providers.php
Normal file
5
src/bootstrap/providers.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
App\Providers\AppServiceProvider::class,
|
||||
];
|
||||
86
src/composer.json
Normal file
86
src/composer.json
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"$schema": "https://getcomposer.org/schema.json",
|
||||
"name": "laravel/laravel",
|
||||
"type": "project",
|
||||
"description": "The skeleton application for the Laravel framework.",
|
||||
"keywords": ["laravel", "framework"],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"laravel/framework": "^12.0",
|
||||
"laravel/tinker": "^2.10.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.23",
|
||||
"laravel/pail": "^1.2.2",
|
||||
"laravel/pint": "^1.24",
|
||||
"laravel/sail": "^1.41",
|
||||
"mockery/mockery": "^1.6",
|
||||
"nunomaduro/collision": "^8.6",
|
||||
"phpunit/phpunit": "^11.5.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"setup": [
|
||||
"composer install",
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
|
||||
"@php artisan key:generate",
|
||||
"@php artisan migrate --force",
|
||||
"npm install",
|
||||
"npm run build"
|
||||
],
|
||||
"dev": [
|
||||
"Composer\\Config::disableProcessTimeout",
|
||||
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
|
||||
],
|
||||
"test": [
|
||||
"@php artisan config:clear --ansi",
|
||||
"@php artisan test"
|
||||
],
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate --ansi",
|
||||
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
||||
"@php artisan migrate --graceful --ansi"
|
||||
],
|
||||
"pre-package-uninstall": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"pestphp/pest-plugin": true,
|
||||
"php-http/discovery": true
|
||||
}
|
||||
},
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true
|
||||
}
|
||||
8388
src/composer.lock
generated
Normal file
8388
src/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
126
src/config/app.php
Normal file
126
src/config/app.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application, which will be used when the
|
||||
| framework needs to place the application's name in a notification or
|
||||
| other UI elements where an application name needs to be displayed.
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the "environment" your application is currently
|
||||
| running in. This may determine how you prefer to configure various
|
||||
| services the application utilizes. Set this in your ".env" file.
|
||||
|
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => (bool) env('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| the application so that it's available within Artisan commands.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default timezone for your application, which
|
||||
| will be used by the PHP date and date-time functions. The timezone
|
||||
| is set to "UTC" by default as it is suitable for most use cases.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by Laravel's translation / localization methods. This option can be
|
||||
| set to any locale for which you plan to have translation strings.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
|
||||
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||
|
||||
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is utilized by Laravel's encryption services and should be set
|
||||
| to a random, 32 character string to ensure that all encrypted values
|
||||
| are secure. You should do this prior to deploying the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
|
||||
'previous_keys' => [
|
||||
...array_filter(
|
||||
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
|
||||
),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Maintenance Mode Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These configuration options determine the driver used to determine and
|
||||
| manage Laravel's "maintenance mode" status. The "cache" driver will
|
||||
| allow maintenance mode to be controlled across multiple machines.
|
||||
|
|
||||
| Supported drivers: "file", "cache"
|
||||
|
|
||||
*/
|
||||
|
||||
'maintenance' => [
|
||||
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
|
||||
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
||||
],
|
||||
|
||||
];
|
||||
115
src/config/auth.php
Normal file
115
src/config/auth.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default authentication "guard" and password
|
||||
| reset "broker" for your application. You may change these values
|
||||
| as required, but they're a perfect start for most applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => env('AUTH_GUARD', 'web'),
|
||||
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, you may define every authentication guard for your application.
|
||||
| Of course, a great default configuration has been defined for you
|
||||
| which utilizes session storage plus the Eloquent user provider.
|
||||
|
|
||||
| All authentication guards have a user provider, which defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| system used by the application. Typically, Eloquent is utilized.
|
||||
|
|
||||
| Supported: "session"
|
||||
|
|
||||
*/
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| All authentication guards have a user provider, which defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| system used by the application. Typically, Eloquent is utilized.
|
||||
|
|
||||
| If you have multiple user tables or models you may configure multiple
|
||||
| providers to represent the model / table. These providers may then
|
||||
| be assigned to any extra authentication guards you have defined.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These configuration options specify the behavior of Laravel's password
|
||||
| reset functionality, including the table utilized for token storage
|
||||
| and the user provider that is invoked to actually retrieve users.
|
||||
|
|
||||
| The expiry time is the number of minutes that each reset token will be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
| The throttle setting is the number of seconds a user must wait before
|
||||
| generating more password reset tokens. This prevents the user from
|
||||
| quickly generating a very large amount of password reset tokens.
|
||||
|
|
||||
*/
|
||||
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Confirmation Timeout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define the number of seconds before a password confirmation
|
||||
| window expires and users are asked to re-enter their password via the
|
||||
| confirmation screen. By default, the timeout lasts for three hours.
|
||||
|
|
||||
*/
|
||||
|
||||
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
|
||||
|
||||
];
|
||||
117
src/config/cache.php
Normal file
117
src/config/cache.php
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache store that will be used by the
|
||||
| framework. This connection is utilized if another isn't explicitly
|
||||
| specified when running a cache operation inside the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_STORE', 'database'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
| Supported drivers: "array", "database", "file", "memcached",
|
||||
| "redis", "dynamodb", "octane",
|
||||
| "failover", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'connection' => env('DB_CACHE_CONNECTION'),
|
||||
'table' => env('DB_CACHE_TABLE', 'cache'),
|
||||
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
|
||||
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
'lock_path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
|
||||
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
|
||||
],
|
||||
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
|
||||
'octane' => [
|
||||
'driver' => 'octane',
|
||||
],
|
||||
|
||||
'failover' => [
|
||||
'driver' => 'failover',
|
||||
'stores' => [
|
||||
'database',
|
||||
'array',
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
|
||||
| stores, there might be other applications using the same cache. For
|
||||
| that reason, you may prefix every cache key to avoid collisions.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
|
||||
|
||||
];
|
||||
183
src/config/database.php
Normal file
183
src/config/database.php
Normal file
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for database operations. This is
|
||||
| the connection which will be utilized unless another connection
|
||||
| is explicitly specified when you execute a query / statement.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'sqlite'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Below are all of the database connections defined for your application.
|
||||
| An example configuration is provided for each database system which
|
||||
| is supported by Laravel. You're free to add / remove connections.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'url' => env('DB_URL'),
|
||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||
'busy_timeout' => null,
|
||||
'journal_mode' => null,
|
||||
'synchronous' => null,
|
||||
'transaction_mode' => 'DEFERRED',
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DB_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'laravel'),
|
||||
'username' => env('DB_USERNAME', 'root'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
(PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : \PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'mariadb' => [
|
||||
'driver' => 'mariadb',
|
||||
'url' => env('DB_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'laravel'),
|
||||
'username' => env('DB_USERNAME', 'root'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
(PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : \PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DB_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'laravel'),
|
||||
'username' => env('DB_USERNAME', 'root'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => env('DB_CHARSET', 'utf8'),
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'search_path' => 'public',
|
||||
'sslmode' => env('DB_SSLMODE', 'prefer'),
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DB_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'laravel'),
|
||||
'username' => env('DB_USERNAME', 'root'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => env('DB_CHARSET', 'utf8'),
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run on the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => [
|
||||
'table' => 'migrations',
|
||||
'update_date_on_publish' => true,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer body of commands than a typical key-value system
|
||||
| such as Memcached. You may define your connection settings here.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => [
|
||||
|
||||
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
|
||||
'persistent' => env('REDIS_PERSISTENT', false),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => env('REDIS_USERNAME'),
|
||||
'password' => env('REDIS_PASSWORD'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
||||
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
||||
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
||||
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => env('REDIS_USERNAME'),
|
||||
'password' => env('REDIS_PASSWORD'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
||||
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
||||
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
||||
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
80
src/config/filesystems.php
Normal file
80
src/config/filesystems.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default filesystem disk that should be used
|
||||
| by the framework. The "local" disk, as well as a variety of cloud
|
||||
| based disks are available to your application for file storage.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Below you may configure as many filesystem disks as necessary, and you
|
||||
| may even configure multiple disks for the same driver. Examples for
|
||||
| most supported storage drivers are configured here for reference.
|
||||
|
|
||||
| Supported drivers: "local", "ftp", "sftp", "s3"
|
||||
|
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/private'),
|
||||
'serve' => true,
|
||||
'throw' => false,
|
||||
'report' => false,
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => rtrim(env('APP_URL', 'http://localhost'), '/').'/storage',
|
||||
'visibility' => 'public',
|
||||
'throw' => false,
|
||||
'report' => false,
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'url' => env('AWS_URL'),
|
||||
'endpoint' => env('AWS_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||
'throw' => false,
|
||||
'report' => false,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Symbolic Links
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the symbolic links that will be created when the
|
||||
| `storage:link` Artisan command is executed. The array keys should be
|
||||
| the locations of the links and the values should be their targets.
|
||||
|
|
||||
*/
|
||||
|
||||
'links' => [
|
||||
public_path('storage') => storage_path('app/public'),
|
||||
],
|
||||
|
||||
];
|
||||
132
src/config/logging.php
Normal file
132
src/config/logging.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
use Monolog\Processor\PsrLogMessageProcessor;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that is utilized to write
|
||||
| messages to your logs. The value provided here should match one of
|
||||
| the channels present in the list of "channels" configured below.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deprecations Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the log channel that should be used to log warnings
|
||||
| regarding deprecated PHP and library features. This allows you to get
|
||||
| your application ready for upcoming major versions of dependencies.
|
||||
|
|
||||
*/
|
||||
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Laravel
|
||||
| utilizes the Monolog PHP logging library, which includes a variety
|
||||
| of powerful log handlers and formatters that you're free to use.
|
||||
|
|
||||
| Available drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog", "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => env('LOG_DAILY_DAYS', 14),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
|
||||
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => StreamHandler::class,
|
||||
'handler_with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
118
src/config/mail.php
Normal file
118
src/config/mail.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send all email
|
||||
| messages unless another mailer is explicitly specified when sending
|
||||
| the message. All additional mailers can be configured within the
|
||||
| "mailers" array. Examples of each type of mailer are provided.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'log'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mailer Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure all of the mailers used by your application plus
|
||||
| their respective settings. Several examples have been configured for
|
||||
| you and you are free to add your own as your application requires.
|
||||
|
|
||||
| Laravel supports a variety of mail "transport" drivers that can be used
|
||||
| when delivering an email. You may specify which one you're using for
|
||||
| your mailers below. You may also add additional mailers if needed.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
|
||||
| "postmark", "resend", "log", "array",
|
||||
| "failover", "roundrobin"
|
||||
|
|
||||
*/
|
||||
|
||||
'mailers' => [
|
||||
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'scheme' => env('MAIL_SCHEME'),
|
||||
'url' => env('MAIL_URL'),
|
||||
'host' => env('MAIL_HOST', '127.0.0.1'),
|
||||
'port' => env('MAIL_PORT', 2525),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'transport' => 'ses',
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'transport' => 'postmark',
|
||||
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
|
||||
// 'client' => [
|
||||
// 'timeout' => 5,
|
||||
// ],
|
||||
],
|
||||
|
||||
'resend' => [
|
||||
'transport' => 'resend',
|
||||
],
|
||||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'transport' => 'array',
|
||||
],
|
||||
|
||||
'failover' => [
|
||||
'transport' => 'failover',
|
||||
'mailers' => [
|
||||
'smtp',
|
||||
'log',
|
||||
],
|
||||
'retry_after' => 60,
|
||||
],
|
||||
|
||||
'roundrobin' => [
|
||||
'transport' => 'roundrobin',
|
||||
'mailers' => [
|
||||
'ses',
|
||||
'postmark',
|
||||
],
|
||||
'retry_after' => 60,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all emails sent by your application to be sent from
|
||||
| the same address. Here you may specify a name and address that is
|
||||
| used globally for all emails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
];
|
||||
129
src/config/queue.php
Normal file
129
src/config/queue.php
Normal file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel's queue supports a variety of backends via a single, unified
|
||||
| API, giving you convenient access to each backend using identical
|
||||
| syntax for each. The default queue connection is defined below.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('QUEUE_CONNECTION', 'database'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the connection options for every queue backend
|
||||
| used by your application. An example configuration is provided for
|
||||
| each backend supported by Laravel. You're also free to add more.
|
||||
|
|
||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis",
|
||||
| "deferred", "background", "failover", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sync' => [
|
||||
'driver' => 'sync',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'connection' => env('DB_QUEUE_CONNECTION'),
|
||||
'table' => env('DB_QUEUE_TABLE', 'jobs'),
|
||||
'queue' => env('DB_QUEUE', 'default'),
|
||||
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
|
||||
'queue' => env('BEANSTALKD_QUEUE', 'default'),
|
||||
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
|
||||
'block_for' => 0,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'default'),
|
||||
'suffix' => env('SQS_SUFFIX'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
|
||||
'block_for' => null,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'deferred' => [
|
||||
'driver' => 'deferred',
|
||||
],
|
||||
|
||||
'background' => [
|
||||
'driver' => 'background',
|
||||
],
|
||||
|
||||
'failover' => [
|
||||
'driver' => 'failover',
|
||||
'connections' => [
|
||||
'database',
|
||||
'deferred',
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Job Batching
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following options configure the database and table that store job
|
||||
| batching information. These options can be updated to any database
|
||||
| connection and table which has been defined by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'batching' => [
|
||||
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||
'table' => 'job_batches',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options configure the behavior of failed queue job logging so you
|
||||
| can control how and where failed jobs are stored. Laravel ships with
|
||||
| support for storing failed jobs in a simple file or in a database.
|
||||
|
|
||||
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
||||
38
src/config/services.php
Normal file
38
src/config/services.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||
| location for this type of information, allowing packages to have
|
||||
| a conventional file to locate the various service credentials.
|
||||
|
|
||||
*/
|
||||
|
||||
'postmark' => [
|
||||
'key' => env('POSTMARK_API_KEY'),
|
||||
],
|
||||
|
||||
'resend' => [
|
||||
'key' => env('RESEND_API_KEY'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'notifications' => [
|
||||
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
|
||||
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
217
src/config/session.php
Normal file
217
src/config/session.php
Normal file
@@ -0,0 +1,217 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines the default session driver that is utilized for
|
||||
| incoming requests. Laravel supports a variety of storage options to
|
||||
| persist session data. Database storage is a great default choice.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "memcached",
|
||||
| "redis", "dynamodb", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'database'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to expire immediately when the browser is closed then you may
|
||||
| indicate that via the expire_on_close configuration option.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => (int) env('SESSION_LIFETIME', 120),
|
||||
|
||||
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to easily specify that all of your session data
|
||||
| should be encrypted before it's stored. All encryption is performed
|
||||
| automatically by Laravel and you may use the session like normal.
|
||||
|
|
||||
*/
|
||||
|
||||
'encrypt' => env('SESSION_ENCRYPT', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing the "file" session driver, the session files are placed
|
||||
| on disk. The default storage location is defined here; however, you
|
||||
| are free to provide another location where they should be stored.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => storage_path('framework/sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" or "redis" session drivers, you may specify a
|
||||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table to
|
||||
| be used to store sessions. Of course, a sensible default is defined
|
||||
| for you; however, you're welcome to change this to another table.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => env('SESSION_TABLE', 'sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using one of the framework's cache driven session backends, you may
|
||||
| define the cache store which should be used to store the session data
|
||||
| between requests. This must match one of your defined cache stores.
|
||||
|
|
||||
| Affects: "dynamodb", "memcached", "redis"
|
||||
|
|
||||
*/
|
||||
|
||||
'store' => env('SESSION_STORE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
|
||||
'lottery' => [2, 100],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the session cookie that is created by
|
||||
| the framework. Typically, you should not need to change this value
|
||||
| since doing so does not grant a meaningful security improvement.
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => env(
|
||||
'SESSION_COOKIE',
|
||||
Str::slug((string) env('APP_NAME', 'laravel')).'-session'
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application, but you're free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => env('SESSION_PATH', '/'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the domain and subdomains the session cookie is
|
||||
| available to. By default, the cookie will be available to the root
|
||||
| domain without subdomains. Typically, this shouldn't be changed.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTPS Only Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By setting this option to true, session cookies will only be sent back
|
||||
| to the server if the browser has a HTTPS connection. This will keep
|
||||
| the cookie from being sent to you when it can't be done securely.
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Access Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. It's unlikely you should disable this option.
|
||||
|
|
||||
*/
|
||||
|
||||
'http_only' => env('SESSION_HTTP_ONLY', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Same-Site Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines how your cookies behave when cross-site requests
|
||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||
| will set this value to "lax" to permit secure cross-site requests.
|
||||
|
|
||||
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
||||
|
|
||||
| Supported: "lax", "strict", "none", null
|
||||
|
|
||||
*/
|
||||
|
||||
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Partitioned Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will tie the cookie to the top-level site for
|
||||
| a cross-site context. Partitioned cookies are accepted by the browser
|
||||
| when flagged "secure" and the Same-Site attribute is set to "none".
|
||||
|
|
||||
*/
|
||||
|
||||
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
|
||||
|
||||
];
|
||||
1
src/database/.gitignore
vendored
Normal file
1
src/database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
||||
44
src/database/factories/UserFactory.php
Normal file
44
src/database/factories/UserFactory.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
*/
|
||||
protected static ?string $password;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration')->index();
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
|
||||
Schema::create('job_batches', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('total_jobs');
|
||||
$table->integer('pending_jobs');
|
||||
$table->integer('failed_jobs');
|
||||
$table->longText('failed_job_ids');
|
||||
$table->mediumText('options')->nullable();
|
||||
$table->integer('cancelled_at')->nullable();
|
||||
$table->integer('created_at');
|
||||
$table->integer('finished_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
Schema::dropIfExists('job_batches');
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
||||
25
src/database/seeders/DatabaseSeeder.php
Normal file
25
src/database/seeders/DatabaseSeeder.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
use WithoutModelEvents;
|
||||
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
}
|
||||
}
|
||||
17
src/package.json
Normal file
17
src/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "https://www.schemastore.org/package.json",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"dev": "vite"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.0.0",
|
||||
"axios": "^1.11.0",
|
||||
"concurrently": "^9.0.1",
|
||||
"laravel-vite-plugin": "^2.0.0",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"vite": "^7.0.7"
|
||||
}
|
||||
}
|
||||
35
src/phpunit.xml
Normal file
35
src/phpunit.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory>tests/Unit</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Feature">
|
||||
<directory>tests/Feature</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<source>
|
||||
<include>
|
||||
<directory>app</directory>
|
||||
</include>
|
||||
</source>
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||
<env name="BROADCAST_CONNECTION" value="null"/>
|
||||
<env name="CACHE_STORE" value="array"/>
|
||||
<env name="DB_CONNECTION" value="sqlite"/>
|
||||
<env name="DB_DATABASE" value=":memory:"/>
|
||||
<env name="MAIL_MAILER" value="array"/>
|
||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
<env name="PULSE_ENABLED" value="false"/>
|
||||
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||
<env name="NIGHTWATCH_ENABLED" value="false"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
25
src/public/.htaccess
Normal file
25
src/public/.htaccess
Normal file
@@ -0,0 +1,25 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Handle X-XSRF-Token Header
|
||||
RewriteCond %{HTTP:x-xsrf-token} .
|
||||
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Send Requests To Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
41
src/public/Leaflet-1.7.1/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
41
src/public/Leaflet-1.7.1/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Thanks for taking the time to open an issue!
|
||||
Please provide a general summary of the issue in the title above .
|
||||
-->
|
||||
|
||||
- [ ] I've looked at the [documentation](http://leafletjs.com/reference.html) to make sure the behavior is documented and expected
|
||||
- [ ] I'm sure this is a Leaflet code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
|
||||
- [ ] I've searched through the issues to make sure it's not yet reported
|
||||
|
||||
**Steps to reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
- step 1
|
||||
- step 2
|
||||
- ...
|
||||
|
||||
**Expected behavior**
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Current behavior**
|
||||
<!-- A clear and concise description of what is actually happening. -->
|
||||
|
||||
**Environment**
|
||||
- Leaflet version:
|
||||
- Browser (with version):
|
||||
- OS/Platform (with version):
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context about the problem here. -->
|
||||
|
||||
**Minimal example reproducing the issue**
|
||||
|
||||
Please create an example using https://leafletjs.com/edit.html or any other jsfiddle-like site.
|
||||
|
||||
- [ ] this example is as simple as possible
|
||||
- [ ] this example does not rely on any third party code
|
||||
17
src/public/Leaflet-1.7.1/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
17
src/public/Leaflet-1.7.1/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
17
src/public/Leaflet-1.7.1/.github/ISSUE_TEMPLATE/support.md
vendored
Normal file
17
src/public/Leaflet-1.7.1/.github/ISSUE_TEMPLATE/support.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Support
|
||||
about: If you have a "How to" question, please use StackOverflow or StackExchange.
|
||||
|
||||
---
|
||||
|
||||
--------------^ Click "Preview" tab for a nicer view!
|
||||
|
||||
We use GitHub as an issue tracker and **do not provide support here**.
|
||||
For usage and support questions, please check out resources below:
|
||||
|
||||
1. Read Leaflet documentation: https://leafletjs.com
|
||||
2. For support questions like "How can I do X with Leaflet?" please search or ask questions on StackOverflow or StackExchange using Leaflet tag:
|
||||
- https://stackoverflow.com/questions/tagged/leaflet
|
||||
- https://gis.stackexchange.com/questions/tagged/leaflet
|
||||
|
||||
Thanks!
|
||||
22
src/public/Leaflet-1.7.1/.gitignore
vendored
Normal file
22
src/public/Leaflet-1.7.1/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
tmp/**/*
|
||||
.idea
|
||||
.idea/**/*
|
||||
*.iml
|
||||
_site
|
||||
*.sublime-*
|
||||
_site
|
||||
dist/*.js
|
||||
dist/*.map
|
||||
dist/reference.html
|
||||
coverage/
|
||||
*.js.html
|
||||
.mailmap
|
||||
bower.json
|
||||
component.json
|
||||
debug/local/
|
||||
Gemfile.lock
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
*.log
|
||||
32
src/public/Leaflet-1.7.1/.travis.yml
Normal file
32
src/public/Leaflet-1.7.1/.travis.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
node_js:
|
||||
- node
|
||||
addons:
|
||||
artifacts:
|
||||
paths:
|
||||
- dist
|
||||
target_paths:
|
||||
- content/leaflet/${NAME}
|
||||
firefox: latest
|
||||
chrome: stable
|
||||
env:
|
||||
global:
|
||||
- ARTIFACTS_BUCKET=leafletjs-cdn
|
||||
- ARTIFACTS_PERMISSIONS=public-read
|
||||
- secure: |-
|
||||
JlC1rD7WryxlUbWmD3NWVX9E60XB/+ss7+j0OaY3WqWziGUWDCuoVkOMGXnp
|
||||
Ev27O8qhlmRkeyiimUN64UzK0yeZ139DcZMY6r4A5E2kwHYRAO/H/zl5RAGo
|
||||
Yd9GUPwZfr3xV8WhH2GFy/L/mRjkGwue2o6ZxdsqBOKfYaF9Ryg=
|
||||
- secure: |-
|
||||
XW1hzORAtSpTgTKkQwel5gRMDy6SotzeSRsVV2jQCn46VIMx8G/J5nOI+ImL
|
||||
yeoH12PhCR0h39dM7mq8TYJo5DHwvbotI5nQhpMruSt8eMFbym8nGiqQh806
|
||||
fSJXkxmQ4MAjUdNFDIirBHhdZme8q3PueFzJ+5odFMvPGn/aITQ=
|
||||
script:
|
||||
- npm test -- -- --browsers PhantomJSCustom,Chrome1280x1024,FirefoxPointer,FirefoxTouch,FirefoxPointerTouch --reporters dots
|
||||
after_success:
|
||||
- npm run build
|
||||
- cd dist && zip -x .DS_Store -r leaflet.zip . && cd ..
|
||||
- NAME=$TRAVIS_BRANCH
|
||||
- '[[ $TRAVIS_PULL_REQUEST != ''false'' ]] && NAME=$TRAVIS_PULL_REQUEST'
|
||||
- '[[ -n $TRAVIS_TAG ]] && NAME=$TRAVIS_TAG'
|
||||
1906
src/public/Leaflet-1.7.1/CHANGELOG.md
Normal file
1906
src/public/Leaflet-1.7.1/CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
198
src/public/Leaflet-1.7.1/CONTRIBUTING.md
Normal file
198
src/public/Leaflet-1.7.1/CONTRIBUTING.md
Normal file
@@ -0,0 +1,198 @@
|
||||
Contributing to Leaflet
|
||||
=======================
|
||||
|
||||
1. [Getting Involved](#getting-involved)
|
||||
2. [Reporting Bugs](#reporting-bugs)
|
||||
3. [Contributing Code](#contributing-code)
|
||||
4. [Running the Tests](#running-the-tests)
|
||||
6. [Improving Documentation](#improving-documentation)
|
||||
7. [Code of Conduct](#code-of-conduct)
|
||||
8. [Thank You](#thank-you)
|
||||
|
||||
## Getting Involved
|
||||
|
||||
Third-party patches are absolutely essential in our quest to create the best mapping library that will ever exist.
|
||||
However, they're not the only way to get involved with Leaflet development.
|
||||
You can help the project tremendously by discovering and [reporting bugs](#reporting-bugs);
|
||||
[improving documentation](#improving-documentation);
|
||||
helping others on [Stack Overflow](https://stackoverflow.com/questions/tagged/leaflet),
|
||||
[GIS Stack Exchange](https://gis.stackexchange.com/questions/tagged/leaflet)
|
||||
and [GitHub issues](https://github.com/Leaflet/Leaflet/issues);
|
||||
tweeting to [@LeafletJS](http://twitter.com/LeafletJS);
|
||||
and spreading the word about Leaflet among your colleagues and friends.
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
Before reporting a bug on the project's [issues page](https://github.com/Leaflet/Leaflet/issues),
|
||||
first make sure that your issue is caused by Leaflet, not your application code
|
||||
(e.g. passing incorrect arguments to methods, etc.).
|
||||
Second, search the already reported issues for similar cases,
|
||||
and if it's already reported, just add any additional details in the comments.
|
||||
|
||||
After you've made sure that you've found a new Leaflet bug,
|
||||
here are some tips for creating a helpful report that will make fixing it much easier and quicker:
|
||||
|
||||
* Write a **descriptive, specific title**. Bad: *Problem with polylines*. Good: *Doing X in IE9 causes Z*.
|
||||
* Include **browser, OS and Leaflet version** info in the description.
|
||||
* Create a **simple test case** that demonstrates the bug (e.g. using [Leaflet plunker](http://leafletjs.com/edit.html)).
|
||||
* Check whether the bug can be reproduced in **other browsers**.
|
||||
* Check if the bug occurs in the stable version, master, or both.
|
||||
* *Bonus tip:* if the bug only appears in the master version but the stable version is fine,
|
||||
use `git bisect` to find the exact commit that introduced the bug.
|
||||
|
||||
If you just want some help with your project,
|
||||
try asking on [Stack Overflow](https://stackoverflow.com/questions/tagged/leaflet)
|
||||
or [GIS Stack Exchange](https://gis.stackexchange.com/questions/tagged/leaflet) instead.
|
||||
|
||||
## Contributing Code
|
||||
|
||||
### Considerations for Accepting Patches
|
||||
|
||||
While we happily accept patches, we're also committed to keeping Leaflet simple, lightweight and blazingly fast.
|
||||
So bugfixes, performance optimizations and small improvements that don't add a lot of code
|
||||
are much more likely to get accepted quickly.
|
||||
|
||||
Before sending a pull request with a new feature, check if it's been discussed before already
|
||||
on [GitHub issues](https://github.com/Leaflet/Leaflet/issues)
|
||||
and ask yourself two questions:
|
||||
|
||||
1. Are you sure that this new feature is important enough to justify its presence in the Leaflet core?
|
||||
Or will it look better as a plugin in a separate repository?
|
||||
2. Is it written in a simple, concise way that doesn't add bulk to the codebase?
|
||||
|
||||
If your feature or API improvement did get merged into master,
|
||||
please consider submitting another pull request with the corresponding [documentation update](#improving-documentation).
|
||||
|
||||
### Setting up the Build System
|
||||
|
||||
The Leaflet build system uses [NodeJS](http://nodejs.org/).
|
||||
To set up the Leaflet build system, install [NodeJS](https://nodejs.org/).
|
||||
Then run the following commands in the project root to install dependencies:
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
or, if you prefer [`yarn`](https://yarnpkg.com/) over `npm`:
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Making Changes to Leaflet Source
|
||||
|
||||
If you're not yet familiar with the way GitHub works (forking, pull requests, etc.),
|
||||
be sure to check out the awesome [article about forking](https://help.github.com/articles/fork-a-repo)
|
||||
on the GitHub Help website — it will get you started quickly.
|
||||
|
||||
You should always write each batch of changes (feature, bugfix, etc.) in **its own topic branch**.
|
||||
Please do not commit to the `master` branch, or your unrelated changes will go into the same pull request.
|
||||
|
||||
You should also follow the code style and whitespace conventions of the original codebase.
|
||||
In particular, use tabs for indentation and spaces for alignment.
|
||||
|
||||
Before committing your changes, run `npm run lint` to catch any JS errors in the code and fix them.
|
||||
If you add any new files to the Leaflet source, make sure to also add them to `build/deps.js`
|
||||
so that the build system knows about them.
|
||||
|
||||
Also, please make sure that you have [line endings configured properly](https://help.github.com/articles/dealing-with-line-endings) in Git! Otherwise the diff will show that all lines of a file were changed even if you touched only one.
|
||||
|
||||
Happy coding!
|
||||
|
||||
### Using RollupJS
|
||||
|
||||
The source JavaScript code for Leaflet is a few dozen files, in the `src/` directory.
|
||||
But normally, Leaflet is loaded in a web browser as just one JavaScript file.
|
||||
|
||||
In order to create this file, run `npm run rollup` or `yarn run rollup`.
|
||||
|
||||
You'll find `dist/leaflet-src.js` and `dist/leaflet.js`. The difference is that
|
||||
`dist/leaflet-src.js` has sourcemaps and it's not uglified, so it's better for
|
||||
development. `dist/leaflet.js` is uglified and thus is smaller, so it's better
|
||||
for deployment.
|
||||
|
||||
When developing (or bugfixing) core Leaflet functionalities, it's common to use
|
||||
the webpages in the `debug/` directory, and run the unit tests (`spec/index.html`)
|
||||
in a graphical browser. This requires regenerating the bundled files quickly.
|
||||
|
||||
In order to do so, run `npm run watch` or `yarn run watch`. This will keep
|
||||
on rebuilding the bundles whenever any source file changes.
|
||||
|
||||
## Running the Tests
|
||||
|
||||
To run the tests from the command line,
|
||||
install [PhantomJS](http://phantomjs.org/) (and make sure it's in your `PATH`),
|
||||
then run:
|
||||
|
||||
```
|
||||
npm test
|
||||
```
|
||||
|
||||
To run all the tests in actual browsers at the same time, you can do:
|
||||
|
||||
```
|
||||
npm test -- -- --browsers Firefox,Chrome,Safari,IE
|
||||
```
|
||||
|
||||
(Note: the doubling of "`--`" [special option](https://docs.npmjs.com/cli/run-script#description) is [important](https://github.com/Leaflet/Leaflet/pull/6166#issuecomment-390959903))
|
||||
|
||||
To run the tests in a browser manually, open `spec/index.html`.
|
||||
|
||||
## Improving Documentation
|
||||
|
||||
The code of the live Leaflet website that contains all documentation and examples is located in the `docs/` directory of the `master` branch
|
||||
and is automatically generated from a set of HTML and Markdown files by [Jekyll](http://jekyllrb.com/).
|
||||
|
||||
The easiest way to make little improvements such as fixing typos without even leaving the browser
|
||||
is by editing one of the files with the online GitHub editor:
|
||||
browse the [`docs/ directory`](https://github.com/Leaflet/Leaflet/tree/master/docs),
|
||||
choose a certain file for editing (e.g. `plugins.md` for the list of Leaflet plugins),
|
||||
click the Edit button, make changes and follow instructions from there.
|
||||
Once it gets merged, the changes will immediately appear on the website.
|
||||
|
||||
If you need to make edits in a local repository to see how it looks in the process, do the following:
|
||||
|
||||
1. [Install Ruby](http://www.ruby-lang.org/en/) if you don't have it yet.
|
||||
2. Run `gem install jekyll`.
|
||||
3. Enter the directory where you cloned the Leaflet repository
|
||||
4. Make sure you are in the `master` branch by running `git checkout master`
|
||||
5. Enter the documentation subdirectory by running `cd docs`
|
||||
6. Run `bundle install`
|
||||
7. Run `jekyll serve --watch` (if you have a Gem::LoadError error run `bundle exec jekyll serve --watch` instead)
|
||||
8. Open `localhost:4000` in your web browser.
|
||||
|
||||
Now any file changes will be updated when you reload pages automatically.
|
||||
After committing the changes, just send a pull request.
|
||||
|
||||
### API documentation
|
||||
|
||||
Since Leaflet 1.0.0-rc1, the API documentation in `reference-1.0.0.html` is handled
|
||||
via [Leafdoc](https://github.com/Leaflet/Leafdoc). This means that next to the
|
||||
code for every method, option or property there is a special code comment documenting
|
||||
that feature. In order to edit the API documentation, just edit these comments in the
|
||||
source code.
|
||||
|
||||
In order to generate the documentation, make sure that the development dependencies
|
||||
are installed (run either `npm install` or `yarn install`), then just run
|
||||
|
||||
```
|
||||
npm run docs
|
||||
```
|
||||
|
||||
and you'll find a `.html` file in the `dist/` directory.
|
||||
|
||||
On every release of a new Leaflet version, this file will be generated and copied
|
||||
over to `docs/reference.html` - there is no need to send pull requests with changes to this file to update the API documentation.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
Everyone is invited to participate in the Leaflet community and related projects:
|
||||
we want to create a welcoming and friendly environment.
|
||||
Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces.
|
||||
The [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/)
|
||||
applies to all projects under the Leaflet organization.
|
||||
Report any issues to agafonkin@gmail.com.
|
||||
|
||||
## Thank You
|
||||
|
||||
Not only does your contribution to Leaflet and its community earn our gratitude, but it also makes you AWESOME.
|
||||
Join [this approved list of awesome people](https://github.com/Leaflet/Leaflet/graphs/contributors)
|
||||
and help us push the limits of what's possible with online maps!
|
||||
141
src/public/Leaflet-1.7.1/FAQ.md
Normal file
141
src/public/Leaflet-1.7.1/FAQ.md
Normal file
@@ -0,0 +1,141 @@
|
||||
# Leaflet FAQ
|
||||
|
||||
This is a collection of answers to the most frequently asked questions about Leaflet.
|
||||
|
||||
1. [Data Providers](#data-providers)
|
||||
2. [Commercial Use and Licensing](#commercial-use-and-licensing)
|
||||
3. [Features](#features)
|
||||
4. [Performance](#performance)
|
||||
5. [Misc](#misc)
|
||||
|
||||
## Data Providers
|
||||
|
||||
#### The map is wrong in my neighborhood, could you fix it?
|
||||
|
||||
Nope, but you can.
|
||||
The map you see on Leaflet examples is based on [OpenStreetMap](http://openstreetmap.org),
|
||||
a free editable map of the world.
|
||||
Signing up and editing the map there is easy,
|
||||
and the changes will be reflected on the map in a few minutes.
|
||||
|
||||
#### What map tiles can I use with Leaflet? Is it limited to OpenStreetMap?
|
||||
|
||||
Leaflet is provider-agnostic, meaning you can use any map provider as long as you conform to its terms of use.
|
||||
You can roll your own tiles as well.
|
||||
[OpenStreetMap](http://openstreetmap.org) is the most popular data source among different tile providers,
|
||||
but there are providers that use other sources.
|
||||
|
||||
Check out [this example](http://leaflet-extras.github.io/leaflet-providers/preview/)
|
||||
with over seventy different layers to choose from.
|
||||
Popular commercial options, free up to a particular number of requests, include
|
||||
[MapBox](http://mapbox.com),
|
||||
[Bing Maps](http://www.microsoft.com/maps/choose-your-bing-maps-API.aspx) (using a [plugin](https://github.com/shramov/leaflet-plugins)),
|
||||
[Esri ArcGIS](http://www.esri.com/software/arcgis/arcgisonline/maps/maps-and-map-layers) ([official plugin](https://github.com/Esri/esri-leaflet)),
|
||||
[MapQuest](https://developer.mapquest.com/products) ([official plugins](https://developer.mapquest.com/documentation/leaflet-plugins))
|
||||
and [Here Maps](https://developer.here.com/).
|
||||
|
||||
Always be sure to **read the terms of use** of a chosen tile provider, **know its limitations**, and **attribute it properly** in your app.
|
||||
|
||||
#### I'm looking for satellite imagery to use with my Leaflet map, any options?
|
||||
|
||||
[MapBox](http://mapbox.com),
|
||||
[Bing Maps](http://www.microsoft.com/maps/choose-your-bing-maps-API.aspx),
|
||||
[ArcGIS](http://www.esri.com/software/arcgis/arcgisonline/maps/maps-and-map-layers)
|
||||
and [MapQuest Open](http://developer.mapquest.com/web/products/open/map) provide satellite imagery among others.
|
||||
|
||||
#### I want to use Google Maps API tiles with Leaflet, can I do that?
|
||||
|
||||
The problem with Google is that its [Terms of Use](https://developers.google.com/maps/terms) forbid any means of tile access other than through the Google Maps API.
|
||||
|
||||
You can add the Google Maps API as a Leaflet layer with the [GoogleMutant plugin](https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant). But note that the map experience will not be perfect, because Leaflet must wait for the Google Maps JS engine to load the map tiles, so you might experience glitches and lagging when using it.
|
||||
|
||||
#### I want to roll my own OSM tile server for Leaflet, where do I start?
|
||||
|
||||
Check out [this excellent guide](http://switch2osm.org/serving-tiles/).
|
||||
|
||||
#### I want to create tiles from my own data for use with Leaflet, what are the options?
|
||||
|
||||
There's a number of services that allow you to do this easily,
|
||||
notably [MapBox](https://www.mapbox.com/), [CartoDB](http://cartodb.com/) and [GIS Cloud](http://www.giscloud.com/).
|
||||
If you want to make tiles on your own, probably the easiest way is using [TileMill](https://tilemill-project.github.io/tilemill/).
|
||||
TileMill can export your map as a single [.mbtiles](https://www.mapbox.com/developers/mbtiles/) file, which can be copied to a webserver and accessed by Leaflet with [a small PHP script](https://github.com/infostreams/mbtiles-php).
|
||||
Alternatively, you can [extract](https://github.com/mapbox/mbutil) the tiled images from the .mbtiles database and place them directly on your webserver with absolutely no server-side dependencies.
|
||||
|
||||
## Commercial Use and Licensing
|
||||
|
||||
#### I have an app that gets lots of hits a day, and I want to switch from Google/Bing/whatever to Leaflet. Is there a fee for using it?
|
||||
|
||||
Leaflet, unlike Google Maps and other all-in-one solutions, is just a JavaScript library.
|
||||
It's free to use, but doesn't provide map imagery on its own —
|
||||
you have to choose a tile service to combine with it.
|
||||
|
||||
There are [plenty of options](#what-map-tiles-can-i-use-with-leaflet-is-it-limited-to-openstreetmap) for a tile service,
|
||||
each with their own terms of use, prices (some of them free), features, limitations, etc.
|
||||
Choice is yours.
|
||||
|
||||
#### I'm building a commercial app that I plan to sell. Can I use Leaflet in it?
|
||||
|
||||
You're welcome, as the code is published under the very permissive [2-clause BSD License](https://github.com/Leaflet/Leaflet/blob/master/LICENSE).
|
||||
Just make sure to attribute the use of the library somewhere in the app UI or the distribution
|
||||
(e.g. keep the Leaflet link on the map, or mention the use on the About page or a Readme file, etc.) and you'll be fine.
|
||||
|
||||
That only applies to the code though.
|
||||
Make sure you conform to the terms of use of the tile images provider(s) that you choose as well.
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
#### What's the best way to put the data I have on a Leaflet map?
|
||||
|
||||
Check out [this awesome cheatsheet](https://github.com/tmcw/mapmakers-cheatsheet).
|
||||
|
||||
#### Why is there still no feature X in Leaflet?
|
||||
|
||||
First of all, did you check out the [Leaflet plugins page](http://leafletjs.com/plugins.html)?
|
||||
It lists about a hundred plugins doing all kinds of crazy stuff,
|
||||
and there's a high possibility that it has what you're looking for.
|
||||
|
||||
Generally, we do our best to keep the Leaflet core small, lightweight and simple,
|
||||
focusing on _quality_ instead of _quantity_, and leaving all the rest to plugin authors.
|
||||
|
||||
Check out [this video](http://www.youtube.com/watch?v=_P2SaCPbJ4w) of a talk by the Leaflet creator for more background on the story and philosophy behind Leaflet.
|
||||
Another essential read is [Advocating Simplicity in Open Source](http://blog.universalmind.com/advocating-simplicity-in-open-source/) by the same guy.
|
||||
|
||||
|
||||
## Performance
|
||||
|
||||
#### I have thousands of markers on my map. How do I make it faster and more usable?
|
||||
|
||||
Check out the [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster) plugin. It's amazing.
|
||||
|
||||
#### I have vector data with many thousands of points on my map. Any performance tips?
|
||||
|
||||
Leaflet generally does a pretty good job of handling heavy vector data
|
||||
with its real-time clipping and simplification algorithms,
|
||||
but browser technology still has its limits.
|
||||
Try [switching from SVG to Canvas as the default rendering back-end](http://leafletjs.com/reference.html#global),
|
||||
it may help considerably (depends on the app and the data).
|
||||
|
||||
If you still have too much data to render, you'll have to use some help of a server-side service
|
||||
like [MapBox](https://www.mapbox.com/),
|
||||
[CartoDB](http://cartodb.com/)
|
||||
and [GIS Cloud](http://www.giscloud.com/)
|
||||
(they all work great with Leaflet).
|
||||
What they do under the hood is serving rendered data as image tiles,
|
||||
along with additional data to enable interactivity like hovering shapes
|
||||
(e.g. done using [UTFGrid](https://www.mapbox.com/developers/utfgrid/) —
|
||||
Leaflet [has a nice plugin](https://github.com/danzel/Leaflet.utfgrid) for it).
|
||||
|
||||
|
||||
## Misc
|
||||
|
||||
#### I downloaded the Leaflet source but didn't find `leaflet.js` there. Why is that?
|
||||
|
||||
You can download the built versions using links from the [download page](http://leafletjs.com/download.html).
|
||||
It even includes the latest build of the development version (`master` branch),
|
||||
updated automatically on each commit to the repo.
|
||||
|
||||
We removed the built versions from the repository because it's a chore to build and commit them manually on each change,
|
||||
and it often complicates merging branches and managing contributions.
|
||||
|
||||
There's a common complaint that Leaflet can't be used with [Bower](http://bower.io/) because of that, but we'll resolve the issue soon.
|
||||
23
src/public/Leaflet-1.7.1/LICENSE
Normal file
23
src/public/Leaflet-1.7.1/LICENSE
Normal file
@@ -0,0 +1,23 @@
|
||||
Copyright (c) 2010-2019, Vladimir Agafonkin
|
||||
Copyright (c) 2010-2011, CloudMade
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are
|
||||
permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
of conditions and the following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
221
src/public/Leaflet-1.7.1/PLUGIN-GUIDE.md
Normal file
221
src/public/Leaflet-1.7.1/PLUGIN-GUIDE.md
Normal file
@@ -0,0 +1,221 @@
|
||||
# Leaflet Plugin Authoring Guide
|
||||
|
||||
One of the greatest things about Leaflet is its powerful plugin ecosystem.
|
||||
The [Leaflet plugins page](http://leafletjs.com/plugins.html) lists dozens of awesome plugins, and more are being added every week.
|
||||
|
||||
This guide lists a number of best practices for publishing a Leaflet plugin that meets the quality standards of Leaflet itself.
|
||||
|
||||
1. [Presentation](#presentation)
|
||||
- [Repository](#repository)
|
||||
- [Name](#name)
|
||||
- [Demo](#demo)
|
||||
- [Readme](#readme)
|
||||
- [License](#license)
|
||||
2. [Code](#code)
|
||||
- [File Structure](#file-structure)
|
||||
- [Code Conventions](#code-conventions)
|
||||
- [Plugin API](#plugin-api)
|
||||
3. [Publishing on NPM](#publishing-on-npm)
|
||||
4. [Module Loaders](#module-loaders)
|
||||
5. [Adding to the plugins list](#adding-to-the-plugins-list)
|
||||
|
||||
## Presentation
|
||||
|
||||
### Repository
|
||||
|
||||
The best place to put your Leaflet plugin is a separate [GitHub](http://github.com) repository.
|
||||
If you create a collection of plugins for different uses,
|
||||
don't put them in one repo —
|
||||
it's usually easier to work with small, self-contained plugins in individual repositories.
|
||||
|
||||
### Name
|
||||
|
||||
Most existing plugins follow the convention of naming plugins (and repos) like this: `Leaflet.MyPluginName`.
|
||||
You can use other forms (e.g. "leaflet-my-plugin-name"),
|
||||
just make sure to include the word "Leaflet" in the name so that it's obvious that it's a Leaflet plugin.
|
||||
|
||||
### Demo
|
||||
|
||||
The most essential thing to do when publishing a plugin is to include a demo that showcases what the plugin does —
|
||||
it's usually the first thing people will look for.
|
||||
|
||||
The easiest way to put up a demo is using [GitHub Pages](http://pages.github.com/).
|
||||
A good [starting point](https://help.github.com/articles/creating-project-pages-manually) is creating a `gh-pages` branch in your repo and adding an `index.html` page to it —
|
||||
after pushing, it'll be published as `http://<user>.github.io/<repo>`.
|
||||
|
||||
### Readme
|
||||
|
||||
The next thing you need to have is a [good `README.md`](https://github.com/noffle/art-of-readme) in the root of the repo (or a link to a website with a similar content).
|
||||
At a minimum it should contain the following items:
|
||||
|
||||
- name of the plugin
|
||||
- a simple, concise description of what it does
|
||||
- requirements
|
||||
- Leaflet version
|
||||
- other external dependencies (if any)
|
||||
- browser / device compatibility
|
||||
- links to demos
|
||||
- instructions for including the plugin
|
||||
- simple usage code example
|
||||
- API reference (methods, options, events)
|
||||
|
||||
### License
|
||||
|
||||
Every open source repository should include a license.
|
||||
If you don't know what open source license to choose for your code,
|
||||
[MIT License](http://opensource.org/licenses/MIT) and [BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause) are both good choices.
|
||||
You can either put it in the repo as a `LICENSE` file or just link to the license from the Readme.
|
||||
|
||||
## Code
|
||||
|
||||
### File Structure
|
||||
|
||||
Keep the file structure clean and simple,
|
||||
don't pile up lots of files in one place —
|
||||
make it easy for a new person to find their way in your repo.
|
||||
|
||||
A barebones repo for a simple plugin would look like this:
|
||||
|
||||
```
|
||||
my-plugin.js
|
||||
README.md
|
||||
```
|
||||
|
||||
An example of a more sophisticated plugin file structure:
|
||||
|
||||
```
|
||||
/src - JS source files
|
||||
/dist - minified plugin JS, CSS, images
|
||||
/spec - test files
|
||||
/lib - any external libraries/plugins if necessary
|
||||
/examples - HTML examples of plugin usage
|
||||
README.md
|
||||
LICENSE
|
||||
package.json
|
||||
```
|
||||
|
||||
### Code Conventions
|
||||
|
||||
Everyone's tastes are different, but it's important to be consistent with whatever conventions you choose for your plugin.
|
||||
|
||||
For a good starting point, check out [Airbnb JavaScript Guide](https://github.com/airbnb/javascript).
|
||||
Leaflet follows pretty much the same conventions
|
||||
except for using smart tabs (hard tabs for indentation, spaces for alignment)
|
||||
and putting a space after the `function` keyword.
|
||||
|
||||
### Plugin API
|
||||
|
||||
Never expose global variables in your plugin.<br>
|
||||
If you have a new class, put it directly in the `L` namespace (`L.MyPlugin`).<br>
|
||||
If you inherit one of the existing classes, make it a sub-property (`L.TileLayer.Banana`).<br>
|
||||
Every class should have a factory function in camelCase, e.g. (`L.tileLayer.banana`).<br>
|
||||
If you want to add new methods to existing Leaflet classes, you can do it like this: `L.Marker.include({myPlugin: …})`.
|
||||
|
||||
Function, method, property and factory names should be in `camelCase`.<br>
|
||||
Class names should be in `CapitalizedCamelCase`.
|
||||
|
||||
If you have a lot of arguments in your function, consider accepting an options object instead
|
||||
(putting default values where possible so that users don't need to specify all of them):
|
||||
|
||||
```js
|
||||
// bad
|
||||
marker.myPlugin('bla', 'foo', null, {}, 5, 0);
|
||||
|
||||
// good
|
||||
marker.myPlugin('bla', {
|
||||
optionOne: 'foo',
|
||||
optionThree: 5
|
||||
});
|
||||
```
|
||||
|
||||
And most importantly, keep it simple. Leaflet is all about *simplicity*.
|
||||
|
||||
## Publishing on NPM
|
||||
|
||||
NPM (Node Packaged Modules) is a package manager and code repository for JavaScript. Publishing your module on NPM allows other developers to quickly find and install your plugin as well as any other plugins it depends on.
|
||||
|
||||
NPM has an excellent [developers guide](https://docs.npmjs.com/using-npm/developers.html) to help you through the process.
|
||||
|
||||
When you publish your plugin you should add a dependency on `leaflet` to your `package.json` file. This will automatically install Leaflet when your package is installed.
|
||||
|
||||
Here is an example of a `package.json` file for a Leaflet plugin.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "my-leaflet-plugin",
|
||||
"version": "1.0.0",
|
||||
"description": "A simple leaflet plugin.",
|
||||
"main": "my-plugin.js",
|
||||
"author": "You",
|
||||
"license": "IST",
|
||||
"peerDependencies": {
|
||||
"leaflet": "^1.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If possible, do not commit your minified files (e.g. `dist`) to a repo; this can
|
||||
lead to confusion when trying to debug the wrong file. Instead, use `npm` to
|
||||
trigger a build/minification just before publishing your package with a
|
||||
[`prepublish` script](https://docs.npmjs.com/misc/scripts#common-uses), for example:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "my-leaflet-plugin",
|
||||
...
|
||||
"scripts": {
|
||||
"prepublish": "grunt build"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can then use the [`.gitignore`](https://help.github.com/articles/ignoring-files/)
|
||||
file to make sure the minified files are not versioned, and an
|
||||
[empty `.npmignore`](https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package)
|
||||
to ensure that they are published to NPM.
|
||||
|
||||
## Module Loaders
|
||||
|
||||
Module loaders such as [RequireJS](http://requirejs.org/) and [Browserify](http://browserify.org/) implement module systems like AMD (Asynchronous Module Definition) and CommonJS to allow developers to modularize and load their code.
|
||||
|
||||
You can add support for AMD/CommonJS loaders to your Leaflet plugin by following this pattern based on the [Universal Module Definition](https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js)
|
||||
|
||||
```js
|
||||
(function (factory, window) {
|
||||
|
||||
// define an AMD module that relies on 'leaflet'
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['leaflet'], factory);
|
||||
|
||||
// define a Common JS module that relies on 'leaflet'
|
||||
} else if (typeof exports === 'object') {
|
||||
module.exports = factory(require('leaflet'));
|
||||
}
|
||||
|
||||
// attach your plugin to the global 'L' variable
|
||||
if (typeof window !== 'undefined' && window.L) {
|
||||
window.L.YourPlugin = factory(L);
|
||||
}
|
||||
}(function (L) {
|
||||
var MyLeafletPlugin = {};
|
||||
// implement your plugin
|
||||
|
||||
// return your plugin when you are done
|
||||
return MyLeafletPlugin;
|
||||
}, window));
|
||||
```
|
||||
|
||||
Now your plugin is available as an AMD and CommonJS module and can be used in module loaders like Browserify and RequireJS.
|
||||
|
||||
|
||||
## Adding to the plugins list
|
||||
|
||||
Once your plugin is published, it is a good idea to add it to the [Leaflet plugins list](http://leafletjs.com/plugins.html). To do so:
|
||||
|
||||
* [Fork](https://help.github.com/articles/fork-a-repo/) the Leaflet repo.
|
||||
* In the `docs/plugins.md` file, find the section your plugin should go in, and add a table row with information and links about your plugin.
|
||||
* Commit the code to your fork.
|
||||
* [Open a pull request](https://help.github.com/articles/creating-a-pull-request/) from your fork to Leaflet's original repo.
|
||||
|
||||
Once the pull request is done, a Leaflet maintainer will have a quick look at your
|
||||
plugin and, if everything looks right, your plugin will appear in the list shortly thereafter.
|
||||
32
src/public/Leaflet-1.7.1/README.md
Normal file
32
src/public/Leaflet-1.7.1/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
<img width="600" src="https://rawgit.com/Leaflet/Leaflet/master/src/images/logo.svg" alt="Leaflet" />
|
||||
|
||||
Leaflet is the leading open-source JavaScript library for **mobile-friendly interactive maps**.
|
||||
Weighing just about 39 KB of gzipped JS plus 4 KB of gzipped CSS code, it has all the mapping [features][] most developers ever need.
|
||||
|
||||
Leaflet is designed with *simplicity*, *performance* and *usability* in mind.
|
||||
It works efficiently across all major desktop and mobile platforms out of the box,
|
||||
taking advantage of HTML5 and CSS3 on modern browsers while being accessible on older ones too.
|
||||
It can be extended with a huge amount of [plugins][],
|
||||
has a beautiful, easy to use and [well-documented][] API
|
||||
and a simple, readable [source code][] that is a joy to [contribute][] to.
|
||||
|
||||
For more info, docs and tutorials, check out the [official website][].<br>
|
||||
For **Leaflet downloads** (including the built master version), check out the [download page][].
|
||||
|
||||
We're happy to meet new contributors.
|
||||
If you want to **get involved** with Leaflet development, check out the [contribution guide][contribute].
|
||||
Let's make the best mapping library that will ever exist,
|
||||
and push the limits of what's possible with online maps!
|
||||
|
||||
[](https://travis-ci.org/Leaflet/Leaflet)
|
||||
|
||||
[contributors]: https://github.com/Leaflet/Leaflet/graphs/contributors
|
||||
[features]: http://leafletjs.com/#features
|
||||
[plugins]: http://leafletjs.com/plugins.html
|
||||
[well-documented]: http://leafletjs.com/reference.html "Leaflet API reference"
|
||||
[source code]: https://github.com/Leaflet/Leaflet "Leaflet GitHub repository"
|
||||
[hosted on GitHub]: http://github.com/Leaflet/Leaflet
|
||||
[contribute]: https://github.com/Leaflet/Leaflet/blob/master/CONTRIBUTING.md "A guide to contributing to Leaflet"
|
||||
[official website]: http://leafletjs.com
|
||||
[download page]: http://leafletjs.com/download.html
|
||||
|
||||
28
src/public/Leaflet-1.7.1/RELEASE.md
Normal file
28
src/public/Leaflet-1.7.1/RELEASE.md
Normal file
@@ -0,0 +1,28 @@
|
||||
Documentation for the release process of Leaflet.
|
||||
|
||||
**Please note that you will need to have a git remote called `origin` that points to Leaflet's GitHub repo, since the publish script assumes it**
|
||||
- [ ] Make a new release branch (for example named `prepare-X.Y.Z`)
|
||||
- [ ] Make sure you do not have any `package.lock.json` or `yarn.lock` locally, since they can potentially make you build with the wrong package versions
|
||||
- [ ] Update [the changelog](https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md) since last release and commit to the release branch
|
||||
- [ ] Write a blog post about the new release and put in `/docs/_posts` and commit to the release branch
|
||||
- [ ] Bump version number in `package.json` and commit to `master`
|
||||
- [ ] Run `npm run release`
|
||||
- [ ] Verify that the release was correctly published to NPM by checking:
|
||||
- [ ] [Leaflet NPM package page](https://www.npmjs.com/package/leaflet)
|
||||
- [ ] files on [Leaflet unpkg page](https://unpkg.com/leaflet@latest/)
|
||||
- [ ] Update API docs:
|
||||
- [ ] run `npm run docs`
|
||||
- [ ] Copy the built docs from `dist/reference-X.Y.Z.html` to `docs/reference-X.Y.Z.html`, remove content before first and after second "CUT HERE" comment
|
||||
- [ ] Insert YAML front matter, see old `docs/reference-X.Y.Z.html` for reference
|
||||
- [ ] Commit the new docs to the release branch
|
||||
- [ ] Update `docs/reference.html` to redirect to the new version and commit the change to the release branch
|
||||
- [ ] Update integrity hashes:
|
||||
- [ ] Checkout the release tag (`git checkout vX.Y.Z`)
|
||||
- [ ] Run `npm run integrity` or simply `node ./build/integrity.js` if you're not on Debian
|
||||
- [ ] Copy the hashes and update `integrity_hash_css`, `integrity_hash_source` and `integrity_hash_uglified` in `docs/_config.yml`; commit changes to the release branch
|
||||
- [ ] Update link to latest release in `docs/download.html`, and commit to the release branch
|
||||
- [ ] Add link to new version reference in `docs/reference-versions.html`, and commit to the release branch
|
||||
- [ ] Update `latest_leaflet_version` (and possibly `latest_leaflet_reference`) in `docs/_config.yml` and commit to the release branch
|
||||
- [ ] Update the announcement section in `docs/index.html` and commit to the release branch
|
||||
- [ ] If it looks like everything is good at this point, merge the release branch into `master`
|
||||
- [ ] Make a new release on [Leaflet's GitHub release page](https://github.com/Leaflet/Leaflet/releases/) with the most important parts of the changelog
|
||||
64
src/public/Leaflet-1.7.1/build/docs-index.leafdoc
Normal file
64
src/public/Leaflet-1.7.1/build/docs-index.leafdoc
Normal file
@@ -0,0 +1,64 @@
|
||||
This file just defines the order of the classes in the docs.
|
||||
|
||||
|
||||
|
||||
|
||||
@class Map
|
||||
|
||||
@class Marker
|
||||
@class Popup
|
||||
@class Tooltip
|
||||
|
||||
@class TileLayer
|
||||
@class TileLayer.WMS
|
||||
@class ImageOverlay
|
||||
@class VideoOverlay
|
||||
@class SVGOverlay
|
||||
|
||||
@class Path
|
||||
@class Polyline
|
||||
@class Polygon
|
||||
@class Rectangle
|
||||
@class Circle
|
||||
@class CircleMarker
|
||||
@class SVG
|
||||
@class Canvas
|
||||
|
||||
@class LayerGroup
|
||||
@class FeatureGroup
|
||||
@class GeoJSON
|
||||
@class GridLayer
|
||||
|
||||
@class LatLng
|
||||
@class LatLngBounds
|
||||
@class Point
|
||||
@class Bounds
|
||||
@class Icon
|
||||
@class DivIcon
|
||||
|
||||
@class Control.Zoom
|
||||
@class Control.Attribution
|
||||
@class Control.Layers
|
||||
@class Control.Scale
|
||||
|
||||
@class Browser
|
||||
@class Util
|
||||
@class Transformation
|
||||
@class LineUtil
|
||||
@class PolyUtil
|
||||
|
||||
@class DomEvent
|
||||
@class DomUtil
|
||||
@class PosAnimation
|
||||
@class Draggable
|
||||
|
||||
@class Class
|
||||
@class Evented
|
||||
@class Layer
|
||||
@class Interactive layer
|
||||
@class Control
|
||||
@class Handler
|
||||
@class Projection
|
||||
@class CRS
|
||||
@class Renderer
|
||||
@class Event objects
|
||||
51
src/public/Leaflet-1.7.1/build/docs-misc.leafdoc
Normal file
51
src/public/Leaflet-1.7.1/build/docs-misc.leafdoc
Normal file
@@ -0,0 +1,51 @@
|
||||
Miscellaneous bits of documentation that don't really fit anywhere else
|
||||
|
||||
|
||||
|
||||
@namespace Global Switches
|
||||
|
||||
Global switches are created for rare cases and generally make
|
||||
Leaflet to not detect a particular browser feature even if it's
|
||||
there. You need to set the switch as a global variable to true
|
||||
before including Leaflet on the page, like this:
|
||||
|
||||
```html
|
||||
<script>L_NO_TOUCH = true;</script>
|
||||
<script src="leaflet.js"></script>
|
||||
```
|
||||
|
||||
| Switch | Description |
|
||||
| -------------- | ---------------- |
|
||||
| `L_NO_TOUCH` | Forces Leaflet to not use touch events even if it detects them. |
|
||||
| `L_DISABLE_3D` | Forces Leaflet to not use hardware-accelerated CSS 3D transforms for positioning (which may cause glitches in some rare environments) even if they're supported. |
|
||||
|
||||
|
||||
@namespace noConflict
|
||||
|
||||
This method restores the `L` global variable to the original value
|
||||
it had before Leaflet inclusion, and returns the real Leaflet
|
||||
namespace so you can put it elsewhere, like this:
|
||||
|
||||
```html
|
||||
<script src='libs/l.js'>
|
||||
<!-- L points to some other library -->
|
||||
|
||||
<script src='leaflet.js'>
|
||||
<!-- you include Leaflet, it replaces the L variable to Leaflet namespace -->
|
||||
|
||||
<script>
|
||||
var Leaflet = L.noConflict();
|
||||
// now L points to that other library again, and you can use Leaflet.Map etc.
|
||||
</script>
|
||||
```
|
||||
|
||||
|
||||
@namespace version
|
||||
|
||||
A constant that represents the Leaflet version in use.
|
||||
|
||||
```js
|
||||
L.version; // contains "1.0.0" (or whatever version is currently in use)
|
||||
```
|
||||
|
||||
|
||||
42
src/public/Leaflet-1.7.1/build/docs.js
Normal file
42
src/public/Leaflet-1.7.1/build/docs.js
Normal file
@@ -0,0 +1,42 @@
|
||||
var packageDef = require('../package.json');
|
||||
|
||||
function buildDocs() {
|
||||
|
||||
console.log('Building Leaflet documentation with Leafdoc ...');
|
||||
|
||||
var LeafDoc = require('leafdoc');
|
||||
var doc = new LeafDoc({
|
||||
templateDir: 'build/leafdoc-templates',
|
||||
showInheritancesWhenEmpty: true,
|
||||
leadingCharacter: '@'
|
||||
});
|
||||
|
||||
// Note to Vladimir: Iván's never gonna uncomment the following line. He's
|
||||
// too proud of the little leaves around the code.
|
||||
//doc.setLeadingChar('@');
|
||||
|
||||
// Leaflet uses a couple of non-standard documentable things. They are not
|
||||
// important enough to be classes/namespaces of their own, and should
|
||||
// just be listed in a table like the rest of documentables:
|
||||
doc.registerDocumentable('pane', 'Map panes');
|
||||
doc.registerDocumentable('projection', 'Defined projections');
|
||||
doc.registerDocumentable('crs', 'Defined CRSs');
|
||||
|
||||
doc.addFile('build/docs-index.leafdoc', false);
|
||||
doc.addDir('src');
|
||||
doc.addFile('build/docs-misc.leafdoc', false);
|
||||
|
||||
var out = doc.outputStr();
|
||||
var path = 'dist/reference-' + packageDef.version + '.html';
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
fs.writeFileSync(path, out);
|
||||
console.log('Successfully built ' + path);
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
buildDocs();
|
||||
} else {
|
||||
module.exports = buildDocs;
|
||||
}
|
||||
28
src/public/Leaflet-1.7.1/build/integrity.js
Normal file
28
src/public/Leaflet-1.7.1/build/integrity.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// This script calculates the integrity hashes of the files in dist/ , and
|
||||
// **overwrites** the values in the documentation.
|
||||
|
||||
var ssri = require('ssri');
|
||||
var fs = require('fs');
|
||||
var version = require('../package.json').version;
|
||||
|
||||
const integritySrc = ssri.fromData(fs.readFileSync('dist/leaflet-src.js'));
|
||||
const integrityUglified = ssri.fromData(fs.readFileSync('dist/leaflet.js'));
|
||||
const integrityCss = ssri.fromData(fs.readFileSync('dist/leaflet.css'));
|
||||
|
||||
|
||||
console.log('Integrity hashes for ', version, ':');
|
||||
console.log('dist/leaflet-src.js: ', integritySrc.toString());
|
||||
console.log('dist/leaflet.js: ', integrityUglified.toString());
|
||||
console.log('dist/leaflet.css: ', integrityCss.toString());
|
||||
|
||||
var docConfig = fs.readFileSync('docs/_config.yml').toString();
|
||||
|
||||
docConfig = docConfig.
|
||||
replace(/latest_leaflet_version:.*/, 'latest_leaflet_version: ' + version).
|
||||
replace(/integrity_hash_source:.*/, 'integrity_hash_source: "' + integritySrc.toString() + '"').
|
||||
replace(/integrity_hash_uglified:.*/, 'integrity_hash_uglified: "' + integrityUglified.toString() + '"').
|
||||
replace(/integrity_hash_css:.*/, 'integrity_hash_css: "' + integrityCss.toString() + '"');
|
||||
|
||||
// console.log('New jekyll docs config: \n', docConfig);
|
||||
|
||||
fs.writeFileSync('docs/_config.yml', docConfig);
|
||||
@@ -0,0 +1 @@
|
||||
{{{rawmarkdown comments}}}
|
||||
@@ -0,0 +1,17 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b>(
|
||||
{{~#each params~}}
|
||||
{{#if type}}<nobr><{{{type type}}}></nobr> {{/if}}<i>{{name}}</i>
|
||||
{{~#unless @last}}, {{/unless}}{{/each~}}
|
||||
)</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
13
src/public/Leaflet-1.7.1/build/leafdoc-templates/crs.hbs
Normal file
13
src/public/Leaflet-1.7.1/build/leafdoc-templates/crs.hbs
Normal file
@@ -0,0 +1,13 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>CRS</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b></code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
@@ -0,0 +1,17 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Destructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b>(
|
||||
{{~#each params~}}
|
||||
{{#if type}}<nobr><{{{type type}}}></nobr> {{/if}}<i>{{name}}</i>
|
||||
{{~#unless @last}}, {{/unless}}{{/each~}}
|
||||
)</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
15
src/public/Leaflet-1.7.1/build/leafdoc-templates/event.hbs
Normal file
15
src/public/Leaflet-1.7.1/build/leafdoc-templates/event.hbs
Normal file
@@ -0,0 +1,15 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Event</th>
|
||||
<th>Data</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b></code></td>
|
||||
<td><code>{{{type type}}}</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
{{#each documentables}}
|
||||
{{{rawmarkdown comments}}}
|
||||
{{/each}}
|
||||
17
src/public/Leaflet-1.7.1/build/leafdoc-templates/factory.hbs
Normal file
17
src/public/Leaflet-1.7.1/build/leafdoc-templates/factory.hbs
Normal file
@@ -0,0 +1,17 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Factory</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b>(
|
||||
{{~#each params~}}
|
||||
{{#if type}}<nobr><{{{type type}}}></nobr> {{/if}}<i>{{name}}</i>
|
||||
{{~#unless @last}}, {{/unless}}{{/each~}}
|
||||
)</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
@@ -0,0 +1,19 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Function</th>
|
||||
<th>Returns</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b>(
|
||||
{{~#each params~}}
|
||||
{{#if type}}<nobr><{{{type type}}}></nobr> {{/if}}<i>{{name}}</i>
|
||||
{{~#unless @last}}, {{/unless}}{{/each~}}
|
||||
)</code></td>
|
||||
<td><code>{{{type type}}}</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
153
src/public/Leaflet-1.7.1/build/leafdoc-templates/html.hbs
Normal file
153
src/public/Leaflet-1.7.1/build/leafdoc-templates/html.hbs
Normal file
@@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<link rel="stylesheet" href="../docs/docs/css/normalize.css" />
|
||||
<link rel="stylesheet" href="../docs/docs/css/main.css" />
|
||||
<link rel="stylesheet" href="../docs/docs/css/reference.css" />
|
||||
<script src="../docs/docs/highlight/highlight.pack.js"></script>
|
||||
<link rel="stylesheet" href="../docs/docs/highlight/styles/github-gist.css" />
|
||||
<link rel="stylesheet" href="leaflet.css" />
|
||||
<script src="leaflet.js"></script>
|
||||
</head>
|
||||
<body class='api-page'>
|
||||
<div class='container'>
|
||||
|
||||
<!-- CUT HERE FOR docs/reference-*.html -->
|
||||
|
||||
<h2>Leaflet API reference</h2>
|
||||
<div id="toc" class="clearfix">
|
||||
<div class="toc-col map-col">
|
||||
<h4>Map</h4>
|
||||
<ul>
|
||||
<li><a href="#map-example">Usage example</a></li>
|
||||
<li><a href="#map-factory">Creation</a></li>
|
||||
<li><a href="#map-option">Options</a></li>
|
||||
<li><a href="#map-event">Events</a></li>
|
||||
</ul>
|
||||
<h4>Map Methods</h4>
|
||||
<ul>
|
||||
<li><a href="#map-methods-for-modifying-map-state">Modifying map state</a></li>
|
||||
<li><a href="#map-methods-for-getting-map-state">Getting map state</a></li>
|
||||
<li><a href="#map-methods-for-layers-and-controls">Layers and controls</a></li>
|
||||
<li><a href="#map-conversion-methods">Conversion methods</a></li>
|
||||
<li><a href="#map-other-methods">Other methods</a></li>
|
||||
</ul>
|
||||
<h4>Map Misc</h4>
|
||||
<ul>
|
||||
<li><a href="#map-property">Properties</a></li>
|
||||
<li><a href="#map-pane">Panes</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toc-col">
|
||||
<h4>UI Layers</h4>
|
||||
<ul>
|
||||
<li><a href="#marker">Marker</a></li>
|
||||
<li><a href="#popup">Popup</a></li>
|
||||
<li><a href="#tooltip">Tooltip</a></li>
|
||||
</ul>
|
||||
<h4>Raster Layers</h4>
|
||||
<ul>
|
||||
<li><a href="#tilelayer">TileLayer</a></li>
|
||||
<li><a href="#tilelayer-wms">TileLayer.WMS</a></li>
|
||||
<li><a href="#imageoverlay">ImageOverlay</a></li>
|
||||
<li><a href="#videooverlay">VideoOverlay</a></li>
|
||||
</ul>
|
||||
<h4>Vector Layers</h4>
|
||||
<ul>
|
||||
<li><a href="#path">Path</a></li>
|
||||
<li><a href="#polyline">Polyline</a></li>
|
||||
<li><a href="#polygon">Polygon</a></li>
|
||||
<li><a href="#rectangle">Rectangle</a></li>
|
||||
<li><a href="#circle">Circle</a></li>
|
||||
<li><a href="#circlemarker">CircleMarker</a></li>
|
||||
<li><a href="#svgoverlay">SVGOverlay</a></li>
|
||||
<li><a href="#svg">SVG</a></li>
|
||||
<li><a href="#canvas">Canvas</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toc-col">
|
||||
<h4>Other Layers</h4>
|
||||
<ul>
|
||||
<li><a href="#layergroup">LayerGroup</a></li>
|
||||
<li><a href="#featuregroup">FeatureGroup</a></li>
|
||||
<li><a href="#geojson">GeoJSON</a></li>
|
||||
<li><a href="#gridlayer">GridLayer</a></li>
|
||||
</ul>
|
||||
<h4>Basic Types</h4>
|
||||
<ul>
|
||||
<li><a href="#latlng">LatLng</a></li>
|
||||
<li><a href="#latlngbounds">LatLngBounds</a></li>
|
||||
<li><a href="#point">Point</a></li>
|
||||
<li><a href="#bounds">Bounds</a></li>
|
||||
<li><a href="#icon">Icon</a></li>
|
||||
<li><a href="#divicon">DivIcon</a></li>
|
||||
</ul>
|
||||
<h4>Controls</h4>
|
||||
<ul>
|
||||
<li><a href="#control-zoom">Zoom</a></li>
|
||||
<li><a href="#control-attribution">Attribution</a></li>
|
||||
<li><a href="#control-layers">Layers</a></li>
|
||||
<li><a href="#control-scale">Scale</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toc-col">
|
||||
<!-- <h4>Shared Methods</h4> -->
|
||||
<!-- <ul> -->
|
||||
<!-- <li><a href="#evented">Event</a></li> -->
|
||||
<!-- <li><a href="#layers">Layer</a></li> -->
|
||||
<!-- <li><a href="#popup">Popup</a></li> -->
|
||||
<!-- </ul> -->
|
||||
<h4>Utility</h4>
|
||||
<ul>
|
||||
<li><a href="#browser">Browser</a></li>
|
||||
<li><a href="#util">Util</a></li>
|
||||
<li><a href="#transformation">Transformation</a></li>
|
||||
<li><a href="#lineutil">LineUtil</a></li>
|
||||
<li><a href="#polyutil">PolyUtil</a></li>
|
||||
</ul>
|
||||
<h4>DOM Utility</h4>
|
||||
<ul>
|
||||
<li><a href="#domevent">DomEvent</a></li>
|
||||
<li><a href="#domutil">DomUtil</a></li>
|
||||
<li><a href="#posanimation">PosAnimation</a></li>
|
||||
<li><a href="#draggable">Draggable</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toc-col last-col">
|
||||
<h4>Base Classes</h4>
|
||||
<ul>
|
||||
<li><a href="#class">Class</a></li>
|
||||
<li><a href="#evented">Evented</a></li>
|
||||
<li><a href="#layer">Layer</a></li>
|
||||
<li><a href="#interactive-layer">Interactive layer</a></li>
|
||||
<li><a href="#control">Control</a></li>
|
||||
<li><a href="#handler">Handler</a></li>
|
||||
<!--<li><a class="nodocs" href="#">IFeature</a></li>-->
|
||||
<li><a href="#projection">Projection</a></li>
|
||||
<li><a href="#crs">CRS</a></li>
|
||||
<li><a href="#renderer">Renderer</a></li>
|
||||
</ul>
|
||||
|
||||
<h4>Misc</h4>
|
||||
<ul>
|
||||
<li><a href="#event-objects">Event objects</a></li>
|
||||
<li><a href="#global-switches">global switches</a></li>
|
||||
<li><a href="#noconflict">noConflict</a></li>
|
||||
<li><a href="#version">version</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{{ body }}}
|
||||
|
||||
<!-- CUT HERE FOR docs/reference-*.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../docs/docs/js/docs.js"></script>
|
||||
<script src="../docs/docs/js/reference.js"></script>
|
||||
|
||||
</body></html>
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
<div class='accordion'>
|
||||
<label><span class='expander'>▶</span> {{name}} inherited from {{{type ancestor}}}</label>
|
||||
<div class='accordion-overflow'>
|
||||
<div class='accordion-content'>{{{inherited}}}</div>
|
||||
</div>
|
||||
</div>
|
||||
19
src/public/Leaflet-1.7.1/build/leafdoc-templates/method.hbs
Normal file
19
src/public/Leaflet-1.7.1/build/leafdoc-templates/method.hbs
Normal file
@@ -0,0 +1,19 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Returns</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b>(
|
||||
{{~#each params~}}
|
||||
{{#if type}}<nobr><{{{type type}}}></nobr> {{/if}}<i>{{name}}</i>
|
||||
{{~#unless @last}}, {{/unless}}{{/each~}}
|
||||
)</code></td>
|
||||
<td><code>{{{type type}}}</code></td>
|
||||
<td>{{{rawmarkdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
@@ -0,0 +1,7 @@
|
||||
{{#if name ~}}
|
||||
<h2 id='{{id}}'>{{name}}</h2>
|
||||
{{~ else ~}}
|
||||
<span id='{{id}}'></span>
|
||||
{{/if}}
|
||||
{{{rawmarkdown comments}}}
|
||||
{{{supersections}}}
|
||||
17
src/public/Leaflet-1.7.1/build/leafdoc-templates/option.hbs
Normal file
17
src/public/Leaflet-1.7.1/build/leafdoc-templates/option.hbs
Normal file
@@ -0,0 +1,17 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Option</th>
|
||||
<th>Type</th>
|
||||
<th>Default</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b></code></td>
|
||||
<td><code>{{{type type}}}</code></td>
|
||||
<td><code>{{defaultValue}}</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
17
src/public/Leaflet-1.7.1/build/leafdoc-templates/pane.hbs
Normal file
17
src/public/Leaflet-1.7.1/build/leafdoc-templates/pane.hbs
Normal file
@@ -0,0 +1,17 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Pane</th>
|
||||
<th>Type</th>
|
||||
<th>Z-index</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b></code></td>
|
||||
<td><code>{{{type type}}}</code></td>
|
||||
<td><code>{{defaultValue}}</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
@@ -0,0 +1,13 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Projection</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b></code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
@@ -0,0 +1,15 @@
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th>Property</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
{{#each documentables}}
|
||||
<tr id='{{id}}'>
|
||||
<td><code><b>{{name}}</b></code></td>
|
||||
<td><code>{{{type type}}}</code></td>
|
||||
<td>{{{markdown comments}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody></table>
|
||||
11
src/public/Leaflet-1.7.1/build/leafdoc-templates/section.hbs
Normal file
11
src/public/Leaflet-1.7.1/build/leafdoc-templates/section.hbs
Normal file
@@ -0,0 +1,11 @@
|
||||
<section {{#if isSecondarySection}}class='collapsable'{{/if}}>
|
||||
|
||||
{{#if name}}<h4 id='{{id}}'>{{name}}</h4>{{/if}}
|
||||
|
||||
{{#if comments~}}
|
||||
<div class='section-comments'>{{{markdown comments}}}</div>
|
||||
{{/if}}
|
||||
|
||||
{{{documentables}}}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,7 @@
|
||||
<section>
|
||||
<h3 id='{{id}}'>{{name}}</h3>
|
||||
{{markdown comments}}
|
||||
{{{sections}}}
|
||||
|
||||
{{{inheritances}}}
|
||||
</section>
|
||||
36
src/public/Leaflet-1.7.1/build/publish.sh
Normal file
36
src/public/Leaflet-1.7.1/build/publish.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
npm update
|
||||
|
||||
VERSION=$(node --eval "console.log(require('./package.json').version);")
|
||||
|
||||
npm test || exit 1
|
||||
|
||||
echo "Ready to publish Leaflet version $VERSION."
|
||||
echo "Has the version number been bumped?"
|
||||
read -n1 -r -p "Press Ctrl+C to cancel, or any other key to continue." key
|
||||
|
||||
git checkout -b build
|
||||
|
||||
export NODE_ENV=release
|
||||
|
||||
npm run-script build
|
||||
|
||||
echo "Creating git tag v$VERSION..."
|
||||
|
||||
git add dist/leaflet-src.js dist/leaflet.js dist/leaflet-src.esm.js dist/leaflet-src.js.map dist/leaflet.js.map dist/leaflet-src.esm.js.map -f
|
||||
|
||||
git commit -m "v$VERSION"
|
||||
|
||||
git tag v$VERSION -f
|
||||
git push --tags -f
|
||||
|
||||
echo "Uploading to NPM..."
|
||||
|
||||
npm publish
|
||||
|
||||
git checkout master
|
||||
git branch -D build
|
||||
|
||||
echo "All done."
|
||||
echo "Remember to run 'npm run-script integrity' and then commit the changes to the master branch, in order to update the website."
|
||||
60
src/public/Leaflet-1.7.1/build/rollup-config.js
Normal file
60
src/public/Leaflet-1.7.1/build/rollup-config.js
Normal file
@@ -0,0 +1,60 @@
|
||||
// Config file for running Rollup in "normal" mode (non-watch)
|
||||
|
||||
import rollupGitVersion from 'rollup-plugin-git-version'
|
||||
import json from 'rollup-plugin-json'
|
||||
import gitRev from 'git-rev-sync'
|
||||
import pkg from '../package.json'
|
||||
|
||||
let {version} = pkg;
|
||||
let release;
|
||||
|
||||
// Skip the git branch+rev in the banner when doing a release build
|
||||
if (process.env.NODE_ENV === 'release') {
|
||||
release = true;
|
||||
} else {
|
||||
release = false;
|
||||
const branch = gitRev.branch();
|
||||
const rev = gitRev.short();
|
||||
version += '+' + branch + '.' + rev;
|
||||
}
|
||||
|
||||
const banner = `/* @preserve
|
||||
* Leaflet ${version}, a JS library for interactive maps. http://leafletjs.com
|
||||
* (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||
*/
|
||||
`;
|
||||
|
||||
const outro = `var oldL = window.L;
|
||||
exports.noConflict = function() {
|
||||
window.L = oldL;
|
||||
return this;
|
||||
}
|
||||
|
||||
// Always export us to window global (see #2364)
|
||||
window.L = exports;`;
|
||||
|
||||
export default {
|
||||
input: 'src/Leaflet.js',
|
||||
output: [
|
||||
{
|
||||
file: pkg.main,
|
||||
format: 'umd',
|
||||
name: 'L',
|
||||
banner: banner,
|
||||
outro: outro,
|
||||
sourcemap: true,
|
||||
legacy: true, // Needed to create files loadable by IE8
|
||||
freeze: false
|
||||
},
|
||||
{
|
||||
file: 'dist/leaflet-src.esm.js',
|
||||
format: 'es',
|
||||
banner: banner,
|
||||
sourcemap: true,
|
||||
freeze: false
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
release ? json() : rollupGitVersion()
|
||||
]
|
||||
};
|
||||
30
src/public/Leaflet-1.7.1/build/rollup-watch-config.js
Normal file
30
src/public/Leaflet-1.7.1/build/rollup-watch-config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
// Config file for running Rollup in "watch" mode
|
||||
// This adds a sanity check to help ourselves to run 'rollup -w' as needed.
|
||||
|
||||
import rollupGitVersion from 'rollup-plugin-git-version'
|
||||
import gitRev from 'git-rev-sync'
|
||||
|
||||
const branch = gitRev.branch();
|
||||
const rev = gitRev.short();
|
||||
const version = require('../package.json').version + '+' + branch + '.' + rev;
|
||||
const banner = `/* @preserve
|
||||
* Leaflet ${version}, a JS library for interactive maps. http://leafletjs.com
|
||||
* (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||
*/
|
||||
`;
|
||||
|
||||
export default {
|
||||
input: 'src/Leaflet.js',
|
||||
output: {
|
||||
file: 'dist/leaflet-src.js',
|
||||
format: 'umd',
|
||||
name: 'L',
|
||||
banner: banner,
|
||||
sourcemap: true,
|
||||
legacy: true, // Needed to create files loadable by IE8
|
||||
freeze: false,
|
||||
},
|
||||
plugins: [
|
||||
rollupGitVersion()
|
||||
]
|
||||
};
|
||||
6
src/public/Leaflet-1.7.1/debug/css/mobile.css
Normal file
6
src/public/Leaflet-1.7.1/debug/css/mobile.css
Normal file
@@ -0,0 +1,6 @@
|
||||
html, body, #map {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
5
src/public/Leaflet-1.7.1/debug/css/screen.css
Normal file
5
src/public/Leaflet-1.7.1/debug/css/screen.css
Normal file
@@ -0,0 +1,5 @@
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
39
src/public/Leaflet-1.7.1/debug/hacks/jitter.html
Normal file
39
src/public/Leaflet-1.7.1/debug/hacks/jitter.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1 maximum-scale=1.0 user-scalable=0">
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
<div >
|
||||
<form method="get">Click in field then scroll map (in up/left direction) to see shift of map tiles.
|
||||
<fieldset><label for="textField">Name</label>:
|
||||
<input id="textField" name="textField" type="text" value="">
|
||||
</fieldset>
|
||||
</form>
|
||||
Bug tested to occur on: Safari on Mac (Tested in 5.1.7), iPad/iPhone 5.1.1., Android 4 Browser. Hack is in L.Browser.chrome and TileLayer._addTile
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
//Disable the hack fix
|
||||
L.Browser.chrome = true;
|
||||
|
||||
var map = L.map('map')
|
||||
.setView([50.5, 30.51], 15)
|
||||
.addLayer(osm);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
1
src/public/Leaflet-1.7.1/debug/leaflet-include.js
Normal file
1
src/public/Leaflet-1.7.1/debug/leaflet-include.js
Normal file
@@ -0,0 +1 @@
|
||||
../dist/leaflet-src.js
|
||||
48
src/public/Leaflet-1.7.1/debug/map/canvas.html
Normal file
48
src/public/Leaflet-1.7.1/debug/map/canvas.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map" style="width: 600px; height: 600px; border: 1px solid #ccc"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var tiles = new L.GridLayer();
|
||||
|
||||
tiles.createTile = function(coords) {
|
||||
var tile = document.createElement('canvas'),
|
||||
ctx = tile.getContext('2d');
|
||||
|
||||
tile.width = tile.height = 256;
|
||||
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.fillRect(0, 0, 255, 255);
|
||||
|
||||
ctx.fillStyle = 'black';
|
||||
ctx.fillText('x: ' + coords.x + ', y: ' + coords.y + ', zoom: ' + coords.z, 20, 20);
|
||||
|
||||
ctx.strokeStyle = 'red';
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(0, 0);
|
||||
ctx.lineTo(255, 0);
|
||||
ctx.lineTo(255, 255);
|
||||
ctx.lineTo(0, 255);
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
|
||||
return tile;
|
||||
}
|
||||
|
||||
var map = new L.Map('map', {center: new L.LatLng(50.5, 30.51), zoom: 15, layers: [tiles]});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
50
src/public/Leaflet-1.7.1/debug/map/control-layers.html
Normal file
50
src/public/Leaflet-1.7.1/debug/map/control-layers.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
var geojson = {
|
||||
"type": "Polygon",
|
||||
"coordinates": [[
|
||||
[5.4931640625, 51.781435604431195],
|
||||
[0.9008789062499999, 53.35710874569601],
|
||||
[-2.30712890625, 51.795027225829145],
|
||||
[2.8125, 49.109837790524416],
|
||||
[5.4931640625, 51.781435604431195]
|
||||
]]
|
||||
};
|
||||
|
||||
var map = L.map('map').setView([50.5, 0], 5);
|
||||
|
||||
var OSM_Mapnik = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
var OSM_BlackAndWhite = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
|
||||
maxZoom: 18,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
|
||||
L.control.layers({
|
||||
'OSM': OSM_Mapnik,
|
||||
'OSM BW': OSM_BlackAndWhite
|
||||
}, {
|
||||
'Circle': L.circle([53, 4], 111111).addTo(map),
|
||||
'Polygon': L.polygon([[48, -3], [50, -4], [52, 4]]),
|
||||
'GeoJSON': L.geoJson(geojson),
|
||||
}, {
|
||||
collapsed: false
|
||||
}).addTo(map);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
45
src/public/Leaflet-1.7.1/debug/map/controls.html
Normal file
45
src/public/Leaflet-1.7.1/debug/map/controls.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
osm2 = new L.TileLayer(osmUrl, {attribution: 'Hello world'});
|
||||
|
||||
var map = new L.Map('map').addLayer(osm).setView(new L.LatLng(50.5, 30.512), 15);
|
||||
|
||||
var marker = new L.Marker(new L.LatLng(50.5, 30.505));
|
||||
map.addLayer(marker);
|
||||
marker.bindPopup("Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms out of the box, taking advantage of HTML5 and CSS3 on modern browsers while still being accessible on older ones.").openPopup();
|
||||
|
||||
var marker2 = new L.Marker(new L.LatLng(50.502, 30.515));
|
||||
map.addLayer(marker2);
|
||||
|
||||
var layersControl = new L.Control.Layers({
|
||||
'OSM': osm,
|
||||
'OSM2': osm2
|
||||
}, {
|
||||
'Some marker': marker,
|
||||
'Another marker': marker2
|
||||
});
|
||||
|
||||
map.addControl(layersControl);
|
||||
map.addControl(new L.Control.Scale());
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
33
src/public/Leaflet-1.7.1/debug/map/geolocation.html
Normal file
33
src/public/Leaflet-1.7.1/debug/map/geolocation.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet geolocation debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = new L.Map('map', {zoom: 15, layers: [osm]});
|
||||
|
||||
function logEvent(e) { console.log(e.type); }
|
||||
map.on('locationerror', logEvent);
|
||||
map.on('locationfound', logEvent);
|
||||
|
||||
map.locate({setView: true});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
48
src/public/Leaflet-1.7.1/debug/map/grid.html
Normal file
48
src/public/Leaflet-1.7.1/debug/map/grid.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var grid = L.gridLayer({
|
||||
attribution: 'Grid Layer'
|
||||
});
|
||||
|
||||
grid.createTile = function (coords, done) {
|
||||
var tile = document.createElement('div');
|
||||
tile.innerHTML = [coords.x, coords.y, coords.z].join(', ');
|
||||
tile.style.outline = '1px solid red';
|
||||
tile.style.background = 'white';
|
||||
|
||||
// test async
|
||||
setTimeout(function () {
|
||||
done(null, tile);
|
||||
}, 500 + Math.random() * 500);
|
||||
|
||||
return tile;
|
||||
};
|
||||
|
||||
grid.on('loading', function() { console.log('loading'); });
|
||||
grid.on('load', function() { console.log('load'); });
|
||||
grid.on('tileunload', function(tile) { console.log('tileunload ' + tile.coords.x + ',' + tile.coords.y + ',' + tile.coords.z); });
|
||||
|
||||
var map = L.map('map')
|
||||
.setView([50.5, 30.51], 10)
|
||||
.addLayer(grid);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
11
src/public/Leaflet-1.7.1/debug/map/iframe.html
Normal file
11
src/public/Leaflet-1.7.1/debug/map/iframe.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<style>
|
||||
iframe {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<iframe src="map.html">
|
||||
</iframe>
|
||||
48
src/public/Leaflet-1.7.1/debug/map/image-overlay.html
Normal file
48
src/public/Leaflet-1.7.1/debug/map/image-overlay.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
<button id="populate">Populate with 10 markers</button>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
latlng = new L.LatLng(50.5, 30.51);
|
||||
|
||||
var map = new L.Map('map');
|
||||
map.addLayer(osm);
|
||||
|
||||
var bounds = new L.LatLngBounds(
|
||||
new L.LatLng(40.71222,-74.22655),
|
||||
new L.LatLng(40.77394,-74.12544));
|
||||
|
||||
map.fitBounds(bounds);
|
||||
|
||||
var overlay = new L.ImageOverlay("https://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg", bounds, {
|
||||
opacity: 0.5,
|
||||
interactive: true,
|
||||
attribution: '© A.B.B Corp.'
|
||||
});
|
||||
map.addLayer(overlay);
|
||||
|
||||
overlay.on('dblclick',function (e) {
|
||||
console.log('Double click on image.');
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
37
src/public/Leaflet-1.7.1/debug/map/layer_remove_add.html
Normal file
37
src/public/Leaflet-1.7.1/debug/map/layer_remove_add.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
<button id="removeAdd">Remove and Add Layer</button>
|
||||
|
||||
<script>
|
||||
map = L.map('map', { center: [0, 0], zoom: 3, maxZoom: 4 });
|
||||
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
L.DomUtil.get('removeAdd').onclick = function() {
|
||||
map.removeLayer(osm);
|
||||
|
||||
setTimeout(function() {
|
||||
map.addLayer(osm);
|
||||
}, 1000);
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
33
src/public/Leaflet-1.7.1/debug/map/map-mobile.html
Normal file
33
src/public/Leaflet-1.7.1/debug/map/map-mobile.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/mobile.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
latlng = new L.LatLng(50.5, 30.51);
|
||||
|
||||
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [osm]});
|
||||
|
||||
var marker = new L.Marker(latlng);
|
||||
map.addLayer(marker);
|
||||
|
||||
marker.bindPopup("<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p><p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque felis.</p>");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
56
src/public/Leaflet-1.7.1/debug/map/map-popup.html
Normal file
56
src/public/Leaflet-1.7.1/debug/map/map-popup.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
.setView([51.505, -0.09], 13)
|
||||
.addLayer(osm);
|
||||
|
||||
L.marker([51.5, -0.09]).addTo(map)
|
||||
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();
|
||||
|
||||
L.circle([51.508, -0.11], 500, {
|
||||
color: 'red',
|
||||
fillColor: '#f03',
|
||||
fillOpacity: 0.5
|
||||
}).addTo(map).bindPopup("I am a circle.");
|
||||
|
||||
L.polygon([
|
||||
[51.509, -0.08],
|
||||
[51.503, -0.06],
|
||||
[51.51, -0.047]
|
||||
]).addTo(map).bindPopup("I am a polygon.");
|
||||
|
||||
var popup = L.popup();
|
||||
|
||||
function onMapClick(e) {
|
||||
popup
|
||||
.setLatLng(e.latlng)
|
||||
.setContent("You clicked the map at " + e.latlng.toString())
|
||||
.openOn(map);
|
||||
}
|
||||
|
||||
map.on('click', onMapClick);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
65
src/public/Leaflet-1.7.1/debug/map/map-scaled.html
Normal file
65
src/public/Leaflet-1.7.1/debug/map/map-scaled.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#wrapper {
|
||||
transform: scale(.5, .25); /* scaleX0 = .5 ; scaleY0 = .25 */
|
||||
transform-origin: 0 0;
|
||||
padding: 40px 100px; /* displayed padding-top = scaleY0 * 40px = 10px ; displayed padding-left = scaleX0 * 100px = 50px */
|
||||
}
|
||||
#map {
|
||||
width: 400px;
|
||||
height: 300px;
|
||||
transform: scale(3, 8); /* scaleX = .5 * 3 = 1.5 ; scaleY = .25 * 8 = 2 */
|
||||
transform-origin: 0 0;
|
||||
border-width: 30px 70px; /* displayed border-top-width = scaleY * 30px = 60px ; displayed border-left-width = scaleX * 70px = 105px */
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="wrapper">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
.setView([50.5, 30.51], 15)
|
||||
.addLayer(osm);
|
||||
|
||||
var mapContainer = map.getContainer();
|
||||
|
||||
var marker = L.marker([50.5, 30.51], {
|
||||
draggable: true
|
||||
}).addTo(map);
|
||||
|
||||
map.on('drag', function (event) {
|
||||
console.log('map:');
|
||||
console.log(L.DomEvent.getMousePosition(event.originalEvent, mapContainer));
|
||||
});
|
||||
marker.on('drag', function (event) {
|
||||
console.log('marker:');
|
||||
console.log(L.DomEvent.getMousePosition(event.originalEvent, mapContainer));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
69
src/public/Leaflet-1.7.1/debug/map/map.html
Normal file
69
src/public/Leaflet-1.7.1/debug/map/map.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
<button id="populate">Populate with 10 markers</button>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
.setView([50.5, 30.51], 15)
|
||||
.addLayer(osm);
|
||||
|
||||
var markers = new L.FeatureGroup();
|
||||
|
||||
function getRandomLatLng(llbounds) {
|
||||
var s = llbounds.getSouth(),
|
||||
n = llbounds.getNorth(),
|
||||
w = llbounds.getWest(),
|
||||
e = llbounds.getEast();
|
||||
|
||||
return L.latLng(
|
||||
s + (Math.random() * (n - s)),
|
||||
w + (Math.random() * (e - w))
|
||||
)
|
||||
}
|
||||
|
||||
function populate() {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
L.marker(getRandomLatLng(map.getBounds())).addTo(markers);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
markers.bindPopup("<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p><p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque.</p>").addTo(map);
|
||||
|
||||
populate();
|
||||
L.DomUtil.get('populate').onclick = populate;
|
||||
|
||||
function logEvent(e) { console.log(e.type); }
|
||||
|
||||
// map.on('click', logEvent);
|
||||
// map.on('contextmenu', logEvent);
|
||||
|
||||
// map.on('movestart', logEvent);
|
||||
// map.on('move', logEvent);
|
||||
// map.on('moveend', logEvent);
|
||||
|
||||
// map.on('zoomstart', logEvent);
|
||||
// map.on('zoomend', logEvent);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
63
src/public/Leaflet-1.7.1/debug/map/marker-autopan.html
Normal file
63
src/public/Leaflet-1.7.1/debug/map/marker-autopan.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
map = L.map('map', { center: [0, 0], zoom: 3, maxZoom: 4 });
|
||||
|
||||
var markerAutoPan = new L.Marker([0, -10], {
|
||||
draggable: true,
|
||||
autoPan: true,
|
||||
title: 'AutoPan'
|
||||
});
|
||||
|
||||
map.addLayer(markerAutoPan);
|
||||
markerAutoPan.bindPopup("AutoPan");
|
||||
|
||||
|
||||
var markerDraggable = new L.Marker([0, 10], {
|
||||
title: 'Draggable'
|
||||
});
|
||||
|
||||
map.addLayer(markerDraggable);
|
||||
markerDraggable.bindPopup("Draggable");
|
||||
markerDraggable.dragging.enable();
|
||||
|
||||
var poly = new L.Polygon([[0, 10], [0, 15.5], [0, 50], [20, 20.5]]);
|
||||
map.addLayer(poly);
|
||||
poly.bindPopup("Polygon");
|
||||
|
||||
|
||||
markerDraggable.on('click', function(e) {
|
||||
console.log('markerDraggable click');
|
||||
});
|
||||
markerAutoPan.on('click', function(e) {
|
||||
console.log('markerAutoPan click');
|
||||
})
|
||||
map.on('click', function(e) {
|
||||
console.log('map click');
|
||||
});
|
||||
|
||||
poly.on('click', function(e) {
|
||||
console.log('poly click');
|
||||
});
|
||||
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
62
src/public/Leaflet-1.7.1/debug/map/markers.html
Normal file
62
src/public/Leaflet-1.7.1/debug/map/markers.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
map = L.map('map', { center: [0, 0], zoom: 3, maxZoom: 4 });
|
||||
|
||||
var markerStatic = new L.Marker([0, -10], {
|
||||
draggable: false,
|
||||
title: 'Static'
|
||||
});
|
||||
|
||||
map.addLayer(markerStatic);
|
||||
markerStatic.bindPopup("Static");
|
||||
|
||||
|
||||
var markerDraggable = new L.Marker([0, 10], {
|
||||
title: 'Draggable'
|
||||
});
|
||||
|
||||
map.addLayer(markerDraggable);
|
||||
markerDraggable.bindPopup("Draggable");
|
||||
markerDraggable.dragging.enable();
|
||||
|
||||
var poly = new L.Polygon([[0, 10], [0, 15.5], [0, 50], [20, 20.5]]);
|
||||
map.addLayer(poly);
|
||||
poly.bindPopup("Polygon");
|
||||
|
||||
|
||||
markerDraggable.on('click', function(e) {
|
||||
console.log('markerDraggable click');
|
||||
});
|
||||
markerStatic.on('click', function(e) {
|
||||
console.log('markerStatic click');
|
||||
})
|
||||
map.on('click', function(e) {
|
||||
console.log('map click');
|
||||
});
|
||||
|
||||
poly.on('click', function(e) {
|
||||
console.log('poly click');
|
||||
});
|
||||
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
51
src/public/Leaflet-1.7.1/debug/map/max-bounds-bouncy.html
Normal file
51
src/public/Leaflet-1.7.1/debug/map/max-bounds-bouncy.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/mobile.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Left: Bouncy maxBounds. Right: Not bouncy.</h1>
|
||||
|
||||
<div id="map1" style="float: left; width:45%; height: 80%;"></div>
|
||||
<div id="map2" style="float: left; width:45%; height: 80%;"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm1 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
osm2 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
bounds = new L.LatLngBounds(new L.LatLng(49.5, -11.3), new L.LatLng(61.2, 2.5));
|
||||
|
||||
var map1 = new L.Map('map1', {
|
||||
center: bounds.getCenter(),
|
||||
zoom: 5,
|
||||
layers: [osm1],
|
||||
maxBounds: bounds,
|
||||
maxBoundsViscosity: 0.75
|
||||
});
|
||||
|
||||
var map2 = new L.Map('map2', {
|
||||
center: bounds.getCenter(),
|
||||
zoom: 5,
|
||||
layers: [osm2],
|
||||
maxBounds: bounds,
|
||||
maxBoundsViscosity: 1.0
|
||||
});
|
||||
|
||||
var latlngs = L.rectangle(bounds).getLatLngs();
|
||||
L.polyline(latlngs[0].concat(latlngs[0][0])).addTo(map1);
|
||||
L.polyline(latlngs[0].concat(latlngs[0][0])).addTo(map2);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
36
src/public/Leaflet-1.7.1/debug/map/max-bounds-infinite.html
Normal file
36
src/public/Leaflet-1.7.1/debug/map/max-bounds-infinite.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/mobile.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
bounds = new L.LatLngBounds(new L.LatLng(49.5, Number.NEGATIVE_INFINITY), new L.LatLng(61.2, Number.POSITIVE_INFINITY));
|
||||
|
||||
var map = new L.Map('map', {
|
||||
center: L.latLng(49.5, 30),
|
||||
zoom: 7,
|
||||
layers: [osm],
|
||||
maxBounds: bounds
|
||||
});
|
||||
|
||||
map.setMaxBounds(bounds); // Should not enter infinite recursion
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
41
src/public/Leaflet-1.7.1/debug/map/max-bounds.html
Normal file
41
src/public/Leaflet-1.7.1/debug/map/max-bounds.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet debug page</title>
|
||||
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
||||
|
||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/mobile.css" />
|
||||
|
||||
<script src="../leaflet-include.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
bounds = new L.LatLngBounds(new L.LatLng(49.5, -11.3), new L.LatLng(61.2, 2.5));
|
||||
|
||||
var map = new L.Map('map', {
|
||||
center: bounds.getCenter(),
|
||||
zoom: 7,
|
||||
layers: [osm],
|
||||
maxBounds: bounds
|
||||
});
|
||||
|
||||
|
||||
|
||||
var latlngs = L.rectangle(bounds).getLatLngs();
|
||||
L.polyline(latlngs[0].concat(latlngs[0][0])).addTo(map);
|
||||
|
||||
map.setMaxBounds(bounds); // Should not enter infinite recursion
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user