Hi,
In JavaScript, the properties passed in object literals are comma separated
(' , ') not semicolon (' ; '). And the parameters passed to the function are
also comma separated. So:
createWMSLayer = *function*(layerTitle, url, layerNames, baseLayer) {
*return* *new* OpenLayers.Layer.WMS(
layerTitle,
url,
{
layers : layerNames
}*,*
{
isBaseLayer: baseLayer*,*
singleTile: *true*
}
};
Best regards,
Xurxo Méndez Pérez
http://www.sonxurxo.com
2010/11/24 Mario Nuñez Jimenez <[email protected]>
> createWMSLayer = *function*(layerTitle, url, layerNames, baseLayer) {
>
> *return* *new* OpenLayers.Layer.WMS(
>
> layerTitle,
>
> url,
>
> {
>
> layers : layerNames
>
> });
>
> {
>
> isBaseLayer: baseLayer;
>
> singleTile: *true*;
>
> }
>
> };
>
>
>
> I have writed it this way but it seems to do nothing… I see the tiles
> loading and a void layer tiled…
>
>
> ------------------------------
>
> *From:* Xurxo Mendez [mailto:[email protected]]
> *Sent:* miércoles, 24 de noviembre de 2010 16:30
> *To:* Mario Nuñez Jimenez
> *Cc:* [email protected]
> *Subject:* Re: [OpenLayers-Users] single tile layer
>
>
>
> Hi,
>
> you should place that option in the 'options' object, not in the 'params'
> object. The same for 'isBaseLayer'. Those both are OpenLayer.Layer options,
> not WMS params. Like this:
>
> createWMSLayer = *function*(layerTitle, url, layerNames, baseLayer) {
>
> *return* *new* OpenLayers.Layer.WMS(
>
> layerTitle,
>
> url,
>
> {
>
> layers : layerNames
>
> });
>
> {
> isBaseLayer: baseLayer,
>
> singleTile: *true*
>
> }
>
> };
>
>
>
>
> Best regards,
>
> Xurxo Méndez Pérez
>
> http://www.sonxurxo.com
>
> 2010/11/24 Mario Nuñez Jimenez <[email protected]>
>
> Hello I just want to have my layers in a only single tile, and alter
> searching I found:
>
> SingleTile: trae
>
> But it doesnt do anything… why?
>
>
>
> createWMSLayer = *function*(layerTitle, url, layerNames, baseLayer) {
>
> *return* *new* OpenLayers.Layer.WMS(
>
> layerTitle,
>
> url,
>
> {
>
> layers : layerNames,
>
> isBaseLayer: baseLayer,
>
> singleTile: *true*
>
> });
>
> };
>
>
>
> Layers still being created and get shown but tiled…
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin
> no se hace responsable por su contenido. Su contenido no constituye ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
> partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus.
> ------------------------------------------------------------------
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin
> no se hace responsable por su contenido. Su contenido no constituye ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
> partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus.
> ------------------------------------------------------------------
>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users