PHP code example of xdiego1st / laravel-mapku
1. Go to this page and download the library: Download xdiego1st/laravel-mapku library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xdiego1st / laravel-mapku example snippets
$markers[] = [
'id' => 'armada_1',
'title' => 'TRUK-01',
'subtitle' => 'Budi Santoso (Supir)',
'category' => 'DALAM_PERJALANAN',
'status' => 'aktif',
'status_color' => 'blue', // blue, amber, emerald, purple, slate
'lat' => 0.512345,
'lng' => 101.456789,
'marker_type' => 'truck',
'extra' => [
'armada_code' => 'TRK-01',
'heading' => 85, // Derajat rotasi arah kompas (0 - 360)
'speed_kmh' => 45,
'plate_number' => 'BM 1234 PAL',
'color' => '#2563eb',
],
'attributes' => [
'Supir' => 'Budi Santoso',
'Kontak' => '0812-3456-7890',
'Kecepatan' => '45 km/jam',
'Status' => 'Meluncur ke Lokasi Pemohon',
]
];
'boundary' => [
'enabled' => true,
'name' => 'Kota Pekanbaru',
'source' => 'resources/geojson/pekanbaru.geojson',
'fit_bounds' => true,
'endpoints' => [
'kota' => '/api/mapping/boundary/kota',
'kecamatan' => '/api/mapping/boundary/kecamatan',
'kelurahan' => '/api/mapping/boundary/kelurahan',
],
],
bash
php artisan vendor:publish --tag=mapping-config
php artisan vendor:publish --tag=mapping-assets --force