<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=062001821-23072009>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=062001821-23072009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=062001821-23072009>insert&nbsp;maxResolution to your options2, then it 
should work.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=062001821-23072009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT><FONT face=Arial color=#0000ff size=2>var options2 
= {numZoomLevels:&nbsp;<SPAN class=062001821-23072009>3</SPAN>, projection: 
"EPSG:27700", isBaseLayer: true, maxResolution:1000};<BR></FONT></DIV>
<DIV></FONT><SPAN class=062001821-23072009></SPAN><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>Arnd</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=062001821-23072009></SPAN></FONT></FONT></FONT><BR>&nbsp;</DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org 
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Anthony 
Masinton<BR><B>Gesendet:</B> Donnerstag, 23. Juli 2009 16:07<BR><B>An:</B> 
users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users] Map Image 
Layer<BR></FONT><BR></DIV>
<DIV></DIV><BR clear=all>
<DIV></DIV>
<DIV>Good afternoon,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I've been beating my head against this all day so I'll ask for wisdom from 
the group.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm trying to create a simple map of England with the outlines of all of 
the counties.&nbsp; I have an image which showing this, which I would like to 
use as my basemap&nbsp;for an eventual marker overlay.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Because all of my marker coordinates are in Ordnance Survey British 
National Grid format (x and y are six digit numbers), I have georeferenced this 
image in ArcGIS to get the image bounds.&nbsp; I have then noted these bounds in 
the extents of the image.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The map is here: <A 
href="http://www.thomasav.com/countiesimage.html">http://www.thomasav.com/countiesimage.html</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>As you can see, this is simply the image layer example but with the WMS 
layer removed and the properties of the image layer altered to suit my 
image.</DIV>
<DIV>&nbsp;</DIV>
<DIV>As you can alos see, nothing happens when the page loads. The image area is 
blank.&nbsp; Firebug tells me that map is undefined.&nbsp; I can't figure out 
what this means, as the only thing I've changed is image layer itself.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The code for the page follows, as you can see, I've tried a few things to 
fix this (commented out) but to no avail.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Many many thanks for your time and comments.</DIV>
<DIV>-- Anthony</DIV>
<DIV>&nbsp;</DIV>
<DIV>Code:</DIV>
<DIV>&lt;html xmlns="<A 
href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"&gt;<BR>&nbsp; 
&lt;head&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;title&gt;OpenLayers Image 
Layer Example&lt;/title&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;link rel="stylesheet" 
href="/theme/default/style.css" type="text/css" /&gt;<BR>&nbsp;&nbsp;&nbsp; 
&lt;link rel="stylesheet" href="style.css" type="text/css" 
/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;style 
type="text/css"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.caption 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width: 
512px;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; 
&lt;/style&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;script 
src="/lib/OpenLayers.js"&gt;&lt;/script&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;script 
type="text/javascript"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var 
map;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function 
init(){<BR>&nbsp;&nbsp;<BR>//&nbsp;&nbsp;&nbsp;var options = 
{<BR>//&nbsp;&nbsp;&nbsp;maxExtent: new 
OpenLayers.Bounds(125755.604,922.206,662492.41,661558.365),<BR>//&nbsp;&nbsp;&nbsp;var 
center = bounds.getCenterLonLat(400000, 
400000),<BR>//&nbsp;&nbsp;&nbsp;maxResolution: 
156543,<BR>//&nbsp;&nbsp;&nbsp;units: 'm',<BR>//&nbsp;&nbsp;&nbsp;projection: 
"EPSG:27700"<BR>//&nbsp;&nbsp;&nbsp;isBaseLayer: 
true<BR>//&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map = new OpenLayers.Map ("map");</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var 
options2 = {numZoomLevels: 3, projection: "EPSG:27700", isBaseLayer: 
true};</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var 
graphic = new 
OpenLayers.Layer.Image(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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options2);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.addLayers([graphic]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.addControl(new 
OpenLayers.Control.LayerSwitcher());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.zoomToMaxExtent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp; &lt;/script&gt;<BR>&nbsp; &lt;/head&gt;<BR>&nbsp; 
&lt;body onload="init()"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;h1 id="title"&gt;Image 
Layer Example&lt;/h1&gt;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &lt;div id="tags"&gt;&lt;/div&gt;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &lt;p 
id="shortdesc"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Demonstrate a 
single non-tiled image as a selectable base layer.<BR>&nbsp;&nbsp;&nbsp; 
&lt;/p&gt;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &lt;div style="width:100%; height:100%" 
id="map"&gt;&lt;/div&gt;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &lt;div 
id="docs"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;p 
class="caption"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
The "City Lights" layer above is created from a single web 
accessible<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
image.&nbsp; If you construct it without any resolution related 
options,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
the layer will be given a single resolution based on the 
extent/size.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Otherwise, it behaves much like a regular layer.&nbsp; This is 
primarily<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
intended to be used in an overview map - where another layer 
type<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; might 
not make a good overview.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;/p&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/div&gt;<BR>&nbsp; 
&lt;/body&gt;<BR>&lt;/html&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><BR>&nbsp;</DIV></BODY></HTML>