function createMap($lat, $lng, $zoom)
{
$app = Factory::getApplication();
$opt = array();
if ($this->zoomwheel == 0) {
$opt[] = 'scrollWheelZoom: false,';
}
if ($this->zoomcontrol == 0) {
$opt[] = 'zoomControl: false,';
}
$options = '{' . implode("\n", $opt) . '}';
$o = array();
$o[] = 'var map' . $this->name . $this->id . ' = L.map("' . $this->name . $this->id . '", ' . $options . ').setView([' . PhocaGalleryText::filterValue($lat, 'number2') . ', ' . PhocaGalleryText::filterValue($lng, 'number2') . '], ' . (int) $zoom . ');';
$o[] = 'jQuery(\'.phTabs ul li a\').click(function(){ setTimeout(function() { map' . $this->name . $this->id . '.invalidateSize(); }, 0);});';
$this->output[] = implode("\n", $o);
return true;
}