Hi, I'm new to OpenLayers and I try to add my own button to OpenLayers that calls a JavaScript function when clicked. The button is visible but nothing happens when I click on it.
That's how I define the button: var panel = new OpenLayers.Control.Panel(); var button = new OpenLayers.Control.Button({displayClass: "addMarkerBtn", trigger: addMarker}); panel.addControls([button]); map.addControl(panel); And the function addMarker: addMarker = function() { alert('test'); } I also tried function addMarker() { alert('test'); } Here is a complete test page: http://albspotter.org/osm/test.php Can anyone tell why this doesn't work? Thanks in advance Juergen _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users