Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source MagazineAOE Media

Chapter 5. Using the WEC Map API

5.1. Create the Map Object

The first step in using the WEC Map API is to create a map object. To do that, include the Google Maps class in your code and create an instance of it, passing the API key and the map's height and width as parameters. If the API Key was set through the extension manager, the value can be left empty.

include_once(t3lib_extMgm::extPath('wec_map').'map_service/google/class.tx_wecmap_map_google.php');
$className = t3lib_div::makeInstanceClassName("tx_wecmap_map_google");
$map = new $className($apiKey, $width, $height);