PHP code example of hebbinkpro / pocketmap

1. Go to this page and download the library: Download hebbinkpro/pocketmap 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/ */

    

hebbinkpro / pocketmap example snippets


if (class_exists(PocketMap::class)) {
    $markers = PocketMap::getMarkers(); 
}

$markers->getIcons(): array
$markers->getMarker(string $id, World $world): ?array
$markers->removeMarker(string $id, World $world): bool

$markers->addIconMarker(string $name, Position $pos, string $icon, ?string $id = null): bool
$markers->addCircleMarker(string $name, Position $pos, int $radius, ?string $id = null, string $color = "red", bool $fill = false, ?string $fillColor = null): bool
$markers->addPolygonMarker(string $name, array $positions, World $world, ?string $id = null, string $color = "red", bool $fill = false, ?string $fillColor = null): bool
$markers->addPolylineMarker(string $name, array $positions, World $world, ?string $id = null, string $color = "red", bool $fill = false, ?string $fillColor = null): bool