[OpenLayers-Users] style externalGraphic and WFS new vector layer

2StepForward kwegezeder at web.de
Mon Apr 14 09:01:43 EDT 2008


Hi all,

now if have try it again and it works, cool.....

I have set it up like this:

    var style_em = OpenLayers.Util.extend({},
OpenLayers.Feature.Vector.style['default']);
    
    style_em.fillOpacity        = 1;
    style_em.fillColor            = "#000000";
    style_em.pointRadius      = 0;
    style_em.graphicWidth    = 64;
    style_em.graphicHeight   = 44;
    style_em.externalGraphic =
"http://server/geoserver/prototyp/img/picture.gif";


    var wfs4 = new OpenLayers.Layer.WFS( "EM",
           "http://server/geoserver/wfs?", { typename: 'WFS:em'},
           {
               style: style_em
            });
     map.addLayer(wfs4);

Thats a very nice feature,
Klaus


2StepForward wrote:
> 
> Hi all,
> 
> and first nice to work with OL. Many things of what I will do work's as
> good as could,
> but with one thing I get on my bounds and need some help from you.
> 
> I will use my own server side images with OL. It works great with a vector
> layer and a
> vector feature, where the style is set to externalGraphic: "........" and
> many other style defines.
> Also the dragging mechanism works fine.
> 
> Now I have a consideration, but I don't know if it's true. If a WFS layer
> was defined as a new vector layer, meens without a featureClass
> definition, than all features of that WFS layer has a predefined style. If
> that true, and my debugger say yes, than it will be possible to add the
> externalGraphic, and a reference to my images on the server side,
> attribute to every style of the features. 
> 
> Is this consideration absurd, or is it a possibility to work with WFS
> features in mode of vector and combine it with external graphics of my
> own?
> 
> Thanks,
> Klaus
> 

-- 
View this message in context: http://www.nabble.com/style-externalGraphic-and-WFS-new-vector-layer-tp16677397p16677406.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list