It's fillOpacity and strokeOpacity.
 
see
http://dev.openlayers.org/apidocs/files/OpenLayers/Feature/Vector-js.html
for a full list of properties.
 
Arnd

  _____  

Von: [email protected]
[mailto:[email protected]] Im Auftrag von Mario Nuñez
Jimenez
Gesendet: Donnerstag, 27. Januar 2011 12:27
An: [email protected]
Betreff: [OpenLayers-Users] RE: vector layer, styles



Also I forgot to ask about opacity property at styling because I think its
range is between 0(transparent) and 1(total opacity) so if I change it in my
source code I didn’t get any change on map it feels like features change its
color but the opacity is always the same even if I put a 1 value in opacaity
property so I don’t know how to do to have it as I want.

What is happening? 

Someone could help?

Thank you.

Mario.

 

  _____  

From: Mario Nuñez Jimenez 
Sent: miércoles, 26 de enero de 2011 18:48
To: '[email protected]'
Subject: vector layer, styles

 

I have been taking a look in openlayers website but something is still wrong
because it does not work:

 

 

 

 

 

myStyleMap = new OpenLayers.StyleMap( {

 

      'default' : {

 

            strokeColor : '#007D69', 

 

            strokeWidth : 2,

 

            cursor : 'pointer'

 

      },

 

      'select' : {

 

            strokeWidth : 6,

 

            strokeColor : '#aaffaa'

 

      }

 

});

 

 

 

 

 

layer = new OpenLayers.Layer.Vector(

 

      metadata.title, {

 

            strategies: [new OpenLayers.Strategy.BBOX()],  

 

            protocol: getProtocol(metadata),

 

            styleMap: myStyleMap

 

      }

 

);

 

 

 

I need to apply a style to my layer but I need to add some particular
characteristics as ‘default’ and some others as ‘select’, I say that because
I also tried this:

 

 

 

myMapStyle = new OpenLayers.StyleMap(

 

      OpenLayers.Util.applyDefaults(

 

            {

 

                  pointRadius: 6,

 

                  cursor: 'pointer',

 

                  strokeColor: '#000000',

 

                  fillColor: “#FFAA00”,

 

                  opacity: 4,

 

                  strokeWidth: 1

 

            }, 

 

                  OpenLayers.Feature.Vector.style["default"]

 

            )

 

      );

 

};

 

 

 

layer = new OpenLayers.Layer.Vector(

 

      metadata.title, {

 

            strategies: [new OpenLayers.Strategy.BBOX()],  

 

            protocol: getProtocol(metadata),

 

            styleMap: myStyleMap

 

      }

 

);

 

 

 

But in result only ‘default’ or ‘selected’ is applied, so I don’t know how
to do this way to apply both.

 

Any tip?

 

Thank you for your help.

 

Mario

 
------------------------------------------------------------------
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

Reply via email to