Clint,
We can change the color using Openlayers’ API on client part. Here is the sample code, copy it to the header tag of aspx page and it will work.
Notes: style['default'] is for features in normal status, style['select'] is for features in modification status.
var OnMapCreating = function(map) {
OpenLayers.Feature.Vector.style['default']['fillColor'] = '#ff6500';
OpenLayers.Feature.Vector.style['default']['strokeColor'] = '#000000';
OpenLayers.Feature.Vector.style['default']['pointRadius'] = '6';
OpenLayers.Feature.Vector.style['default']['fillOpacity'] = '0.3';
OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2';
OpenLayers.Feature.Vector.style['default']['strokeOpacity'] = '0.5';
OpenLayers.Feature.Vector.style['select']['fillColor'] = '#0065ce';
OpenLayers.Feature.Vector.style['select']['strokeColor'] = '#000066';
OpenLayers.Feature.Vector.style['select']['pointRadius'] = '6';
OpenLayers.Feature.Vector.style['select']['fillOpacity'] = '0.6';
OpenLayers.Feature.Vector.style['select']['strokeWidth'] = '2';
OpenLayers.Feature.Vector.style['select']['strokeOpacity'] = '0.8';
}
Also, please see the following link for the detail about the style.
dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Feature/Vector-js.html
Thanks,
Ben
277-ChangeDefaultStyle.txt (1.05 KB)