<!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> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=062001821-23072009>insert 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> </DIV>
<DIV dir=ltr align=left><FONT><FONT face=Arial color=#0000ff size=2>var options2
= {numZoomLevels: <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> </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> </DIV>
<DIV>I've been beating my head against this all day so I'll ask for wisdom from
the group.</DIV>
<DIV> </DIV>
<DIV>I'm trying to create a simple map of England with the outlines of all of
the counties. I have an image which showing this, which I would like to
use as my basemap for an eventual marker overlay.</DIV>
<DIV> </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. I have then noted these bounds in
the extents of the image.</DIV>
<DIV> </DIV>
<DIV>The map is here: <A
href="http://www.thomasav.com/countiesimage.html">http://www.thomasav.com/countiesimage.html</A></DIV>
<DIV> </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> </DIV>
<DIV>As you can alos see, nothing happens when the page loads. The image area is
blank. Firebug tells me that map is undefined. I can't figure out
what this means, as the only thing I've changed is image layer itself.</DIV>
<DIV> </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> </DIV>
<DIV>Many many thanks for your time and comments.</DIV>
<DIV>-- Anthony</DIV>
<DIV> </DIV>
<DIV>Code:</DIV>
<DIV><html xmlns="<A
href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"><BR>
<head><BR> <title>OpenLayers Image
Layer Example</title><BR> <link rel="stylesheet"
href="/theme/default/style.css" type="text/css" /><BR>
<link rel="stylesheet" href="style.css" type="text/css"
/><BR> <style
type="text/css"><BR> p.caption
{<BR> width:
512px;<BR> }<BR>
</style><BR> <script
src="/lib/OpenLayers.js"></script><BR> <script
type="text/javascript"><BR> var
map;<BR> function
init(){<BR> <BR>// var options =
{<BR>// maxExtent: new
OpenLayers.Bounds(125755.604,922.206,662492.41,661558.365),<BR>// var
center = bounds.getCenterLonLat(400000,
400000),<BR>// maxResolution:
156543,<BR>// units: 'm',<BR>// projection:
"EPSG:27700"<BR>// isBaseLayer:
true<BR>// };<BR> <BR>
map = new OpenLayers.Map ("map");</DIV>
<DIV> var
options2 = {numZoomLevels: 3, projection: "EPSG:27700", isBaseLayer:
true};</DIV>
<DIV> var
graphic = new
OpenLayers.Layer.Image(<BR>
'Counties',<BR>
'<A
href="http://www.thomasav.com/england.jpg">http://www.thomasav.com/england.jpg</A>',<BR>
new
OpenLayers.Bounds(125755.604,922.206,662492.41,661558.365),<BR>
new OpenLayers.Size(2231,
2746),<BR>
options2);</DIV>
<DIV>
map.addLayers([graphic]);<BR>
map.addControl(new
OpenLayers.Control.LayerSwitcher());<BR>
map.zoomToMaxExtent();<BR>
}<BR> </script><BR> </head><BR>
<body onload="init()"><BR> <h1 id="title">Image
Layer Example</h1></DIV>
<DIV> <div id="tags"></div></DIV>
<DIV> <p
id="shortdesc"><BR> Demonstrate a
single non-tiled image as a selectable base layer.<BR>
</p></DIV>
<DIV> <div style="width:100%; height:100%"
id="map"></div></DIV>
<DIV> <div
id="docs"><BR> <p
class="caption"><BR>
The "City Lights" layer above is created from a single web
accessible<BR>
image. If you construct it without any resolution related
options,<BR>
the layer will be given a single resolution based on the
extent/size.<BR>
Otherwise, it behaves much like a regular layer. This is
primarily<BR>
intended to be used in an overview map - where another layer
type<BR> might
not make a good overview.<BR>
</p><BR> </div><BR>
</body><BR></html></DIV>
<DIV> </DIV>
<DIV><BR><BR> </DIV></BODY></HTML>