[OpenLayers-Users] Problem showing OpenLayer controls in a page
with a DOCTYPE
Christian López Espínola
penyaskito at gmail.com
Thu Jun 28 07:32:38 EDT 2007
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
More information about the Users
mailing list