[OpenLayers-Users] Error implement Style and Rules in
WMS openlayer
Christopher Schmidt
crschmidt at metacarta.com
Wed Sep 9 12:39:40 EDT 2009
On Wed, Sep 09, 2009 at 12:17:26PM -0500, fsalas wrote:
>
> Hi, I like to make one filter using Openlayer Rule, and after that at result
> changed the style
> But when I try to execute, show this error "Openlayer.Style Is not a
> constructor "
> My Openlayer version is 2.5
"Don't do that."
Styles and Rules were added in OpenLayers 2.7.
-- Chris
> var estilo = new OpenLayers.Style();
>
> var regla = new OpenLayers.Rule({
> filter: new OpenLayers.Filter.Comparison({
> type: OpenLayers.Filter.Comparison.EQUAL_TO,
> property: "tipo",
> value: 'FV',
> }),
> symbolizer: {pointRadius: 10, fillColor: "green",
> fillOpacity: 0.5, strokeColor: "black"} });
>
> estilo.addRules([regla]);
>
> Sennales = new OpenLayers.Layer.WMS(
> "Señales","http://urano:3128/geoserver/wms",
> {
> layers: 'topp:sennal',
> srs: 'EPSG:4267',
> height: '557',
> styles: estilo,
> transparent: 'true',
> format: 'image/png'
> },
> {
> buffer: 0
> }
> );
>
> Best , Regards
> Salas
>
>
>
>
>
> ___________________________________
> Dirección de Comunicaciones
> Grupo Empresarial GEOCUBA
> Este mensaje esta libre de virus.
> Revisado por Kaspersky Antivirus
> ----------------------------------------------------------------------
> Definition count: 2513853
> Definition date: 9/9/2009
> SecurityPlus version: 3.0.5
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list