[OpenLayers-Users] Problem showing OpenLayer controls in a page with a DOCTYPE

vsaquicela vsaquicela at gmail.com
Mon May 19 10:06:30 EDT 2008


I don't understand.
How????


Ruben Pardo-2 wrote:
> 
> Hi everybody,
> i solve the problem, it seems to be a wrong path in the images directory.
> Thanks a lot .
> 
> Rubén P.
> 
> 2007/6/28, Christian López Espínola <penyaskito at gmail.com>:
>>
>> I can't reproduce the bug with a example.
>> What browser are you using? Do the problem occurs in other browsers?
>> I can add that in my application i'm using XHTML Strict, but I think
>> that using HTML 4 mustn't be a problem.
>>
>> Cheers from the hot Seville :)
>>
>>
>> On 6/28/07, Ruben Pardo <correosig at gmail.com> wrote:
>> > Hi,
>> >
>> > I'm checking my html source generated but it doesn't work. I'm using
>> > OpenLayers 2.4 API, and still have the same problem. When i remove the
>> tag
>> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
>> > http://www.w3.org/TR/html4/loose.dtd" > it works fine.
>> >
>> > My code  :...........
>> >
>> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
>> > http://www.w3.org/TR/html4/loose.dtd" >
>> > <html >
>> >     <head>
>> >         <meta content="text/html;charset=ISO-8859-1"
>> > http-equiv="Content-Type">
>> >     </head>
>> >     <body onload="init();"  >
>> >
>> >      <style type="text/css">
>> >         #map {
>> >             width: 800px;
>> >             height: 500px;
>> >             border: 1px solid black;
>> >         }
>> >            </style><script src="js/lib/OpenLayers.js"
>> > type="text/javascript"></script> <script
>> > type="text/javascript" >
>> >   <!--
>> >                var map,layer;
>> >
>> >          function init(){
>> >
>> >            map = new OpenLayers.Map('map', { controls: [],tileSize: new
>> > OpenLayers.Size(500,500) });
>> >           layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS","
>> >
>> http://192.168.212.20:84/cgi-bin/mapserv.exe?map=/ms4w/apps/prbmosaico/htdocs/prbmosaico.map
>> ",{layers:
>> > 'PARCELASDE', TRANSPARENT: 'true'},{ maxExtent: new
>> > OpenLayers.Bounds(186555.49,4136068.22,211516.81,4156763.12),
>> maxResolution:
>> > 104} );
>> >
>> >            map.addControl(new OpenLayers.Control.PanZoomBar());
>> >            map.addControl(new OpenLayers.Control.MouseToolbar ());
>> >            map.addControl(new OpenLayers.Control.OverviewMap());
>> >
>> >            map.addLayer(layer);
>> >                     if (!map.getCenter())
>> >                        map.zoomToMaxExtent();
>> >
>> >
>> >          }
>> >         </script>
>> >
>> >       <div style="margin:0px" id="map"></div>
>> > </body>
>> >
>> >
>> >
>> >
>> >
>> > 2007/6/28, Christian López Espínola < penyaskito at gmail.com>:
>> > > Hola Ruben,
>> > >
>> > > The doctype mustn't be a problem with OpenLayers. I'm using ASP.NET
>> > > with OpenLayers and I hadn't any problem.
>> > > Please check the HTML source generated by your application and if you
>> > > can't find the solution, post a piece.
>> > >
>> > > Hope this helps
>> > >
>> > > On 6/28/07, Ruben Pardo <correosig at gmail.com> wrote:
>> > > > Hi everybody,
>> > > >
>> > > > I've got a problem  showing controls with OpenLayers when i put a
>> > doctype on
>> > > > my html page.
>> > > > I'm integrating OpenLayers in a custom jsf component, that
>> autogenerate
>> > the
>> > > > DOCTYPE.
>> > > > It shows me the layers, but not the controls over the layers
>> > (PanZoomBar,
>> > > > Overview, etc...)
>> > > > It works fine when i remove the doctype in the generated code.
>> > > > ¿how can i solve this?
>> > > >
>> > > > Thanks a lot in advance
>> > > >
>> > > > My generated code is ...
>> > > >
>> > > >
>> > ------------------------------------------------------------------
>> > > >
>> > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> > > > "http://www.w3.org/TR/html4/loose.dtd" >-->
>> > > > <html >
>> > > >     <head>
>> > > >         <meta content="text/html;charset=ISO-8859-1"
>> > > > http-equiv="Content-Type">
>> > > > </head><body onload="init();">
>> > > >      <style type="text/css">
>> > > >         #map {
>> > > >             width: 800px;
>> > > >             height: 500px;
>> > > >             border: 1px solid black;
>> > > >         }
>> > > >            </style><script src="js/lib/OpenLayers.js"
>> > > > type="text/javascript"></script> <script
>> > > > type="text/javascript" >
>> > > >   <!--
>> > > >                var map,layer;
>> > > >
>> > > >          function init(){
>> > > >
>> > > >            map = new OpenLayers.Map('map', { controls: [],tileSize:
>> new
>> > > > OpenLayers.Size(500,500) });
>> > > >           layer = new OpenLayers.Layer.MapServer( "OpenLayers
>> > > > WMS","
>> >
>> http://192.168.212.20:84/cgi-bin/mapserv.exe?map=/ms4w/apps/prbmosaico/htdocs/prbmosaico.map
>> > > > ",{layers: 'PARCELASDE', TRANSPARENT: 'true'},{ maxExtent: new
>> > > > OpenLayers.Bounds(186555.49,4136068.22,211516.81,4156763.12),
>> > maxResolution:
>> > > > 104} );
>> > > >
>> > > >            map.addControl(new OpenLayers.Control.PanZoomBar());
>> > > >            map.addControl(new OpenLayers.Control.MouseToolbar ());
>> > > >            map.addControl(new OpenLayers.Control.OverviewMap());
>> > > >
>> > > >            map.addLayer(layer);
>> > > >                     if (!map.getCenter())
>> > > >                        map.zoomToMaxExtent ();
>> > > >
>> > > >
>> > > >         } //-->
>> > > >         </script>
>> > > >
>> > > >
>> > > >       <div  id="map"></div>
>> > > >        </body>
>> > > >
>> >
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> > > >
>> > > > _______________________________________________
>> > > > Users mailing list
>> > > > Users at openlayers.org
>> > > > http://openlayers.org/mailman/listinfo/users
>> > > >
>> > > >
>> > >
>> > >
>> > > --
>> > > Regards,
>> > >
>> > > Christian López Espínola
>> > >
>> >
>> >
>>
>>
>> --
>> Regards,
>>
>> Christian López Espínola
>>
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-showing-OpenLayer-controls-in-a-page-with-a-DOCTYPE-tp11341146p17316721.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list