Skip to content

Latest commit

 

History

History
executable file
·
33 lines (23 loc) · 822 Bytes

kml_layer.md

File metadata and controls

executable file
·
33 lines (23 loc) · 822 Bytes

KML Layer

The Google Maps API supports the KML and GeoRSS data formats for displaying geographic information. For more information, see official documentation.

Build your KML layer

use Fungio\GoogleMap\Layers\KMLLayer;

$kmlLayer = new KMLLayer();

// Configure your KML layer options
$kmlLayer->setUrl('http://www.domain.com/kml_layer.kml');

$kmlLayer->setOption('clickable', true);
$kmlLayer->setOption('suppressInfoWindows', false);
$kmlLayer->setOptions(array(
    'clickable'           => true,
    'suppressInfoWindows' => false,
));

Add your KML layer to the map

use Fungio\GoogleMap\Layers\KMLLayer;

$kmlLayer = new KMLLayer();

// Add your KML layer to the map
$map->addKMLLayer($kmlLayer);