validateValue($url)) $this->url = $url; else throw new CException( Yii::t('EGMap','EGMapKMLService.url must be a valid URL address') ); } /** * @return string Create new control to display latlng and coordinates under mouse. */ public function toJs( $map_js_name = 'map' ) { $return = 'var '.$this->getJsName().'= new google.maps.KmlLayer(\''.$this->url.'\');'.PHP_EOL; $return .= $this->getJsName().'.setMap('.$map_js_name.');'.PHP_EOL; return $return; } }