Skip to content

Commit

Permalink
Google Maps example
Browse files Browse the repository at this point in the history
  • Loading branch information
travisfont committed Feb 1, 2017
1 parent fe335b4 commit c254036
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Maps.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

require_once 'gmaps.php';

define('KEY', 'xxxxx');

$map = new Map(KEY);
$map->setId('12_3');
$map->setAutoZoom(FALSE);
$map->setZoomLevel(MapZoom::CITY);
$map->setCenter(49.57552935827966, 6.090646688697541);
$map->setMapType(MapType::ROADMAP);
$map->renderWithoutScript();

// https://developers.google.com/maps/documentation/javascript/markers
// https://developers.google.com/maps/documentation/javascript/maptypes

$map->infoWindow(array
(
0 => 'Window 1',
1 => 'Window 2'
));

echo $map->render();
echo $map->renderScript();

0 comments on commit c254036

Please sign in to comment.