PHP Classes

File: ex1.php

Recommend this page to a friend!
  Classes of Vagharshak Tozalakyan   Map Builder   ex1.php   Download  
File: ex1.php
Role: Example script
Content type: text/plain
Description: Example 1 - Minimal installation.
Class: Map Builder
Display maps using Google Maps API v3
Author: By
Last change: Added API key.
Date: 7 years ago
Size: 367 bytes
 

Contents

Class file image Download
<?php

// Include MapBuilder class.
require_once 'class.MapBuilder.php';

// Create MapBuilder object.
$map = new MapBuilder();

// Set API key
$map->setApiKey('AIzaSyB230QxSetZoJiM9noon7FiAQXbc-HPSLU');

// Set map's center position by latitude and longitude coordinates.
$map->setCenter(48.858278, 2.294254);

// Display the map.
$map->show();

?>