[OpenLayers-Users] Using Graphic markers for WFS layers

Robert Sanson SansonR at asurequality.com
Mon Sep 15 16:41:53 EDT 2008


Here is how I specify a styleMap:
 
            var style_gate = new OpenLayers.StyleMap({"default": new OpenLayers.Style({
                "graphicOpacity":1,
                "externalGraphic":"markers/main_gate_16.gif",
                "graphicXOffset":-8,
                "graphicYOffset":-8,
                "graphicWidth":16,
                "graphicHeight":16,
                "id":"main_gate",
                "strokeLinecap":"round",
                "strokeOpacity":1,
                "fillOpacity":1,
                "pointRadius":8})
            });
 
I then reference this in my WFS layer definition:
 
var maingatewfs = new OpenLayers.Layer.WFS("Main Gate",
                          "http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&request=getfeature&typename=main_gates&service=wfs&version=1.0.0&BBOX="+x1+","+y1+","+x2+","+y2+"&maxfeatures=10 ( 'http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&request=getfeature&typename=main_gates&service=wfs&version=1.0.0&BBOX="+x1+","+y1+","+x2+","+y2+"&maxfeatures=10' )",
                          {styleMap: style_gate, extractAttributes: true} );
                  map.addLayer(maingatewfs);
 
However, I am still getting the standard translucent orange point symbol.
 
Can anyone point out what is wrong?
 
Many thanks,
 
Robert Sanson
 


>>> "Robert Sanson" <SansonR at asurequality.com> 15/09/2008 4:47 p.m. >>>
I have a map with three WFS point lfeature ayers. I want to use different markers for each WFS layer. How do I specify the icons to use?
 
Many thanks,
 
Robert Sanson
------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.
------------------------------------------------------------------


This message has been scanned for malware by SurfControl plc. www.surfcontrol.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080916/dfc62008/attachment.html


More information about the Users mailing list