public function getOptions() { $res = array('address' => $this->getAddress()); if ($this->bounds != null) { $res['bounds'] = $this->bounds; } if ($this->language != null) { $res['language'] = $this->language; } if ($this->region != null) { $res['region'] = $this->region; } if ($this->onSuccess != null) { $res['onSuccess'] = $this->onSuccess; } return parent::getOptions() + $res; }
/** * Add a marker to the map. * @param Tx_Listfeusers_Gmap_Marker $marker Marker to add * @return Gmap */ public function addMarker(Tx_Listfeusers_Gmap_Marker $marker) { $this->markers[$marker->getId()] = $marker; $this->bounds->addMarker($marker); return $this; }
public function addMarker($row, $icon) { $title = $this->render($row, $this->conf['marker.']['title.']); $description = $this->render($row, $this->conf['marker.']['description.']); if ($row['GPS']) { $GPS = t3lib_div::trimExplode(',', $row['GPS']); $marker = Tx_Listfeusers_Gmap_Marker::factory($row['uid'], $GPS[0], $GPS[1]); $marker->setTitle($title)->setContent($description)->setIcon($icon); $this->map->addMarker($marker); } else { $geocode = Tx_Listfeusers_Gmap_Geocode::geocode($row['uid'], "{$row['address']}, {$row['city']}"); $geocode->setTitle($title)->setContent($description)->setIcon($icon); if ($geocode->lookup()) { $row['GPS'] = $geocode->getLat() . ',' . $geocode->getLng(); $db = $GLOBALS['TYPO3_DB']; $db->exec_UPDATEquery('fe_users', "uid={$row['uid']}", $row); $this->map->addMarker($geocode); } else { $this->map->addMarker($geocode); } } }
/** * * @param Tx_Listfeusers_Gmap_Marker $marker * @return Tx_Listfeusers_Gmap_Bounds */ public function addMarker(Tx_Listfeusers_Gmap_Marker $marker) { $this->addLatLng($marker->getLat(), $marker->getLng()); return $this; }