diff --git a/lib/GMapEventOnce.class.php b/lib/GMapEventOnce.class.php new file mode 100644 index 0000000..a35c1ee --- /dev/null +++ b/lib/GMapEventOnce.class.php @@ -0,0 +1,39 @@ +getTrigger().'", '.$this->getFunction().');'; + } + + /** + * returns the javascript code for attaching a dom event once to a javascript_object + * + * @param string $js_object_name + * @return string + * @author Nicolas Martin + */ + public function getDomEventJs($js_object_name) + { + + return 'google.maps.event.addDomListenerOnce('.$js_object_name.', "'.$this->getTrigger().'", '.$this->getFunction().');'; + } + +} +