예제 #1
0
파일: default.php 프로젝트: salomalo/nbs-01
 */
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
$now = time();
$Itemid = JRequest::getInt('Itemid');
$upload_url = JURI::root() . 'images/com_rental/upload/';
$thumb_90x68_url = JURI::root() . 'img.php?w=90&h=68&q=90&src=';
require_once JPATH_COMPONENT_SITE . DS . 'helpers' . DS . 'simple-gmap-api' . DS . "simpleGMapAPI.php";
require_once JPATH_COMPONENT_SITE . DS . 'helpers' . DS . 'simple-gmap-api' . DS . "simpleGMapGeocoder.php";
$map = new simpleGMapAPI();
$geo = new simpleGMapGeocoder();
$map->setWidth(400);
$map->setHeight(400);
$map->setBackgroundColor('#d0d0d0');
$map->setMapDraggable(true);
$map->setDoubleclickZoom(false);
$map->setScrollwheelZoom(true);
$map->showDefaultUI(false);
$map->showMapTypeControl(true, 'DROPDOWN_MENU');
$map->showNavigationControl(true, 'DEFAULT');
$map->showScaleControl(true);
$map->showStreetViewControl(true);
$map->setZoomLevel(10);
// not really needed because showMap is called in this demo with auto zoom
$map->setInfoWindowBehaviour('SINGLE_CLOSE_ON_MAPCLICK');
$map->setInfoWindowTrigger('CLICK');
//$map->addMarkerByAddress("Toronto, NY");
//$map->addMarkerByAddress("Bloomfield, NY");
//$map->addMarkerByAddress("Gramacy, NY");
//get geocode