[OpenLayers-Users] Halo in OpenLayers (Line, Vector)
Donald Kerr
donald.kerr at dkerr.co.uk
Fri Jul 20 06:19:45 PDT 2012
I hope this helps:
var PointsStyleMap = new OpenLayers.StyleMap({
'default': new OpenLayers.Style({
label: "${getLabel}",
labelAlign: "lt",
labelXOffset: "-16",
labelYOffset: "-20",
fontColor: "blue",
fontSize: "12",
fontFamily: "'Arial'",
fontWeight: "bold",
labelOutlineColor: "black",
labelOutlineWidth: 1
},{
context: {
getLabel: function(feature) {
return feature.attributes['Label'];
}
}
})});
//====== Points WFS ======
var Points = new OpenLayers.Layer.Vector('Points',{
strategies: [new OpenLayers.Strategy.BBOX()],
styleMap: PointsStyleMap,
visibility: true,
protocol: new OpenLayers.Protocol.WFS({
url: WFS_Host,
featureType: 'Points',
featureNS: 'http://mapserver.gis.umn.edu/mapserver',
featurePrefix: 'ms',
geometryName: 'msGeometry',
srsName: 'EPSG:27700',
version: '1.1.0'
})
});
MapOS.addLayer(Points);
This won't work with IE8 and below as it uses VML for rendering but it
should work with those browsers that use SVG e.g. Firefox and Chrome.
Regards,
Donald
-----Original Message-----
From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of adidas
Sent: 20 July 2012 13:30
To: openlayers-users at lists.osgeo.org
Subject: [OpenLayers-Users] Halo in OpenLayers (Line, Vector)
Hello! How to make a halo around the line of one pixel? For example,
line (vector) hase blue color and its frame (one pixel) the black color.
Thanks! _______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list