<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:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        margin-bottom:12.0pt;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:7.5pt;
        margin-left:0cm;
        background:#EEEEEE;
        font-size:9.0pt;
        font-family:Consolas;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:#003082;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        background:#EEEEEE;}
span.kwd1
        {mso-style-name:kwd1;
        color:#8A4A0B;}
span.pln1
        {mso-style-name:pln1;
        color:black;}
span.pun1
        {mso-style-name:pun1;
        color:#145680;}
span.typ1
        {mso-style-name:typ1;
        color:#2B91AF;}
span.str1
        {mso-style-name:str1;
        color:maroon;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#003082'>Hi all,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#003082'><o:p> </o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:#333333'>Im trying to add StreetView functionality to my OpenLayers web app, and would like to add the overlay showing StreetView availability to the map itself. I have seen an example of it being done successfully <a href="http://dev.geoext.org/sandbox/cmoullet/ux/StreetViewPanel/examples/StreetViewPanelExample.html?yaw=297.23&pitch=0&panoZoom=0&clickMode=true&videoTimeInterval=2500&showTool=true&showLinks=true&easting=738600&northing=5862000&zoom=14&panoEasting=740092.82894378&panoNorthing=5863392.1133842">here</a>, but i cannot get the code to work in my own solution. Specifically :<o:p></o:p></span></p><pre><span class=kwd1><span style='font-size:10.0pt;background:#EEEEEE'>var</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> layer </span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>=</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span class=kwd1><span style='font-size:10.0pt;background:#EEEEEE'>new</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span class=typ1><span style='font-size:10.0pt;background:#EEEEEE'>OpenLayers</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>.</span></span><span class=typ1><span style='font-size:10.0pt;background:#EEEEEE'>Layer</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>.</span></span><span class=typ1><span style='font-size:10.0pt;background:#EEEEEE'>Google</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>(</span></span><span class=str1><span style='font-size:10.0pt;background:#EEEEEE'>"Google Street"</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>,</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>{</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'>sphericalMercator</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>:</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span class=kwd1><span style='font-size:10.0pt;background:#EEEEEE'>true</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>});</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span style='font-size:10.0pt;color:black;background:#EEEEEE'><br><span class=pln1> </span><br><span class=pln1>layer</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>.</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'>mapObject</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>.</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'>addOverlay</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>(</span></span><span class=kwd1><span style='font-size:10.0pt;background:#EEEEEE'>new</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span class=typ1><span style='font-size:10.0pt;background:#EEEEEE'>GStreetviewOverlay</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>());</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span style='color:#333333'><o:p></o:p></span></pre><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:#333333'>results in the error:<o:p></o:p></span></p><pre><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'>layer</span></span><span class=pun1><span style='font-size:10.0pt;background:#EEEEEE'>.</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'>mapObject is </span></span><span class=kwd1><span style='font-size:10.0pt;background:#EEEEEE'>null</span></span><span class=pln1><span style='font-size:10.0pt;background:#EEEEEE'> </span></span><span style='color:#333333'><o:p></o:p></span></pre><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:#333333'>Has anyone got any idea what i might be doing wrong, and if so, how can i fix this?<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:#333333'>Thanks in advance!<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:#333333'>Chris<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#003082'><o:p> </o:p></span></p></div></body></html>
<table><tr><td bgcolor=#ffffff><font color=#000000>IMPORTANT - This email and the information that it contains may be confidential, legally privileged and protected by law. Access by the intended recipient only is authorised. Any liability (in negligence or otherwise) arising from any third party acting, or refraining from acting, on any information contained in this email is hereby excluded. If you are not the intended recipient, please notify AmlinCommunications@amlin.co.uk immediately then delete it and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any medium.<br>
<br>
Copyright in this email and attachments created by us belong to Amlin plc and/or one or more of its subsidiaries (Amlin Group). The author also asserts the right to be identified as such and object to any misuse.<br>
</font></td></tr></table>
<table><tr><td bgcolor=#ffffff><font color=#000000>The Amlin Group prohibits and takes steps to prevent its email systems from being used to view, store or transmit offensive, obscene or discriminatory material. If this message contains inappropriate material please report it immediately to AmlinCommunications@amlin.co.uk.<br>
<br>
The Amlin Group records, monitors and may inspect messages that use its telecoms systems in order to protect its information, interests and reputation. Any message sent by you to or within the Amlin Group may therefore be viewed and may be acted upon.<br>
<br>
Of the companies within the Amlin Group, Amlin Underwriting Limited, Amlin Underwriting Services Limited, Amlin UK Limited and Amlin Plus Limited are authorised and regulated by the Financial Services Authority.<br>
</font></td></tr></table>
<table><tr><td bgcolor=#ffffff><font color=#000000>This email has been sent by a member of staff of one or more of the following Amlin Group companies:<br>
<br>
Amlin plc. Registered in England and Wales no. 2854310<br>
Amlin Underwriting Limited. Registered in England and Wales no. 2323018<br>
Amlin Underwriting Services Limited. Registered in England and Wales no. 422615<br>
Amlin UK Limited. Registered in England and Wales no. 2739220<br>
Amlin Plus Limited. Registered in England and Wales no. 4729659<br>
<br>
Registered Offices: St Helen's, 1 Undershaft, London EC3A 8ND, United Kingdom<br>
<br>
Amlin plc switchboard: 020 7746 1000 <br>
Web Site: http://www.amlin.com<br>
</font></td></tr></table>