I'm new to OL and working on a project to display digital photos in a browser using the OL API. I'd like to use a few custom control.buttons added to a control.panel. Trouble is the trigger function is not firing when I click the custom button on the UI. Here's the code.
var clearPicksBtn = new OpenLayers.Control.Button({trigger: clearPicks(pointLayer), displayClass: "clearPicksBtn", title:'Clear all picks'}); var prevPhotoBtn = new OpenLayers.Control.Button({trigger: f_slideshow(-1), displayClass: "prevPhotoBtn", title:'Previous photo'}); var nextPhotoBtn = new OpenLayers.Control.Button({trigger: f_slideshow(1), displayClass: "nextPhotoBtn", title:'Next photo'}); //var panel = new OpenLayers.Control.Panel({div: document.getElementById("panel")}); var panel2 = new OpenLayers.Control.Panel({div: document.getElementById("panel2"), defaultControl: panCustom}); panel2.addControls([panCustom, zb, history.next, history.previous, drawPtControl, dragPtControl, clearPicksBtn, prevPhotoBtn, nextPhotoBtn]); map.addControl(panel2); Next question. I'm trying to load a OpenLayers.Layer.Text layer stored locally on our network. I am not publishing my web page using a web server, it's simply running the html and javascript off a network .html file served over the file network. Trouble is I get an access denied error from IE7 when opening a layer file even if it's in the same path as the html file. Is there a work around? //var newl = new OpenLayers.Layer.Text( "text", {location: "c://temp//test.txt"} ); //map.addLayer(newl); Any help is appreciated. David A. Hollema GIS Analyst United Power, Inc.
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users