<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii"><LINK
media=all href="/webmail/static/deg/css/wysiwyg-3933289048.css" type=text/css
rel=stylesheet>
<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=958341121-24042010>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=958341121-24042010></SPAN></FONT> </DIV>
<DIV>var map = new OpenLayers.Map('map');</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff
size=2>without declare any map options, means, that OpenLayers takes the
default for the map options. That means EPSG:4326 with maxExtent = [-180, -90,
180, 90].</FONT></SPAN></DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff size=2>As
your data is in an other projection, OpenLayers tries to reproject the vector
data. But I think, you don't use the proj4js library, so OpenLayers fails to
reproject the data. And the unprojected data do not fall into maxExtent for
EPSG:4326;</FONT></SPAN></DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff size=2>Try
something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff
size=2> map = new
OpenLayers.Map('map',<BR> { maxExtent:
new OpenLayers.Bounds(<FONT face="Times New Roman" color=#000000
size=3>31789.1658, 790194.4183, 337250.8970, 961865.1338</FONT>), //from <A
href="http://spatialreference.org/ref/epsg/26986/">http://spatialreference.org/ref/epsg/26986/</A><BR>
numZoomLevels: 16,<BR>
maxResolution: auto,<BR>
units: 'm',<BR>
projection: new
OpenLayers.Projection("EPSG:26986"),<BR>
controls:[]<BR> });</FONT><BR></SPAN></DIV>
<DIV><SPAN class=958341121-24042010><FONT face=Arial color=#0000ff
size=2>Arnd</FONT></DIV></SPAN>
<DIV><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>shaun.anderson@verizon.net<BR><B>Gesendet:</B> Samstag, 24. April 2010
17:22<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users]
Simple vector problem<BR></FONT><BR></DIV>
<DIV></DIV>Hi All,<BR><BR>I am very new to OpenLayers. I am doing some testing
and trying to use a GML file for a basemap.<BR><BR>I have the code below, but it
doesn't seem to work. I don't know if there is an error in my code, or if it's
my projection. The GML is in Massachusetts stateplane meters NAD83. So I've
tried to set the projection to that.<BR><BR>When the page loads I get the
default OpenLayers pan and zoom controls. And when I shift+drag I get the
rectangle, but there is no vector data displayed.<BR><BR>please
help<BR>thanks<BR><BR><html><BR><head><BR><title>Open Layers
Test</title><BR><script type="text/javascript"
src="OpenLayers/OpenLayers.js"
</script><BR></head><BR><body><BR><div style="width:100%;
height:100%" id="map"></div><BR>
<script defer="defer"
type="text/javascript"><BR> var map
= new
OpenLayers.Map('map');<BR>
var layer = new OpenLayers.Layer.Vector("GML",
{<BR>
isBaseLayer: true,<BR>
projection: new
OpenLayers.Projection("EPSG:26986"),<BR>
protocol: new
OpenLayers.Protocol.HTTP({<BR>
url: "BikeTrails.gml",<BR>
format: new
OpenLayers.Format.GML()<BR>
})<BR>
});<BR>
map.addLayer(layer);<BR>
map.zoomToMaxExtent();<BR>
</script><BR></body><BR></html><BR></BODY></HTML>