Hmm. Sounds like it must have something to do with relative/absolute paths... maybe the image layer is having trouble?
Maybe someone on the list can help you :-) Erik On 11/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Ok,Thank you! > My html code is: > > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <style type="text/css"> > #map { > width: 800px; > height: 475px; > border: 1px solid black; > } > </style> > <script src="Js/GIS/OpenLayers.js"></script> > <script type="text/javascript"> > var lon = 5; > var lat = 40; > var zoom = 5; > var map, layer; > function init(){ > map = new OpenLayers.Map('map'); > var options = {numZoomLevels: 1}; > var graphic = new OpenLayers.Layer.Image( > '春熙路', > 'Images/Maps/3D.jpg', > new OpenLayers.Bounds(-180, -88.759, 180, > 88.759), > new OpenLayers.Size(1395, 906), > options); > > map.addLayers([graphic]); > map.zoomToExtent(new > OpenLayers.Bounds(-3.922119,44.335327,4.866943,49.553833)); > map.addLayer(new OpenLayers.Layer.GML("GML", > "Maps/GML/MainMap.xml")); > } > </script> > </head> > <body onload="init()"> > <div id="map"></div> > </body> > </html> > > And it is in my root folder. > Not all functions are lost. > > > 在2007-11-08,"Erik Uzureau" <[EMAIL PROTECTED]> 写道: > > > Hi it will be helpful for us to see the html code for your page in > order to know what is wrong. > -E > > On 11/8/07, hz20040 <[EMAIL PROTECTED]> wrote: > > I am a Chinese.First, I am vary sorry for my poor English. > > > > I have a page named 'test.html'.OpenLayers can work well while I view this > > page with > > 'E:\www\test.html',but there are some problems while I view this page with > > 'http://127.0.0.1/test.html'.Do you kown what's wrong? > > Thank you! > > > > > > > > ________________________________ > > 火 速 参 加 2007 网 易 校 园 美 女 大 赛, 超 过 10 万 的 现 金 奖 金 在 等 您!!>> > > _______________________________________________ > > Users mailing list > > [email protected] > > http://openlayers.org/mailman/listinfo/users > > > > > > _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
