<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>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.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>var clearPicksBtn = new OpenLayers.Control.Button({trigger:
clearPicks(pointLayer), displayClass: "clearPicksBtn",<o:p></o:p></p>
<p class=MsoNormal>
title:'Clear all picks'});<o:p></o:p></p>
<p class=MsoNormal>
<o:p></o:p></p>
<p class=MsoNormal>
var prevPhotoBtn = new OpenLayers.Control.Button({trigger: f_slideshow(-1),
displayClass: "prevPhotoBtn",<o:p></o:p></p>
<p class=MsoNormal>
title:'Previous photo'});<o:p></o:p></p>
<p class=MsoNormal>
<o:p></o:p></p>
<p class=MsoNormal>
var nextPhotoBtn = new OpenLayers.Control.Button({trigger: f_slideshow(1),
displayClass: "nextPhotoBtn",<o:p></o:p></p>
<p class=MsoNormal>
title:'Next photo'});<o:p></o:p></p>
<p class=MsoNormal>
<o:p></o:p></p>
<p class=MsoNormal>
//var panel = new OpenLayers.Control.Panel({div:
document.getElementById("panel")});<o:p></o:p></p>
<p class=MsoNormal>
var panel2 = new OpenLayers.Control.Panel({div:
document.getElementById("panel2"), defaultControl: panCustom});<o:p></o:p></p>
<p class=MsoNormal>
<o:p></o:p></p>
<p class=MsoNormal>
<o:p></o:p></p>
<p class=MsoNormal>
panel2.addControls([panCustom, zb, history.next, history.previous,
drawPtControl, <o:p></o:p></p>
<p class=MsoNormal>
dragPtControl, clearPicksBtn, prevPhotoBtn, nextPhotoBtn]);<o:p></o:p></p>
<p class=MsoNormal>
map.addControl(panel2);<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>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?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>//var newl = new OpenLayers.Layer.Text( "text",
{location: "c://temp//test.txt"} );<o:p></o:p></p>
<p class=MsoNormal>
//map.addLayer(newl);<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Any help is appreciated.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>David
A. Hollema<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>GIS
Analyst<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>United
Power, Inc.</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>
</div>
</body>
</html>