The default OpenLayers.Layer.GML style can be nearly invisible when

viewed on the main map.

Set a style that's blue (since not a lot of things on the map are
blue), with strokeWidth 3 and opacity 50%. It makes things visible
enough without being too intrusive.
This commit is contained in:
Ævar Arnfjörð Bjarmason 2009-06-29 02:11:34 +00:00
parent 8d76bf978a
commit b46b3c4327

View file

@ -111,6 +111,11 @@ function addMarkerToMap(position, icon, description) {
function addObjectToMap(url, zoom, callback) {
var layer = new OpenLayers.Layer.GML("Objects", url, {
format: OpenLayers.Format.OSM,
style: {
strokeColor: "blue",
strokeWidth: 3,
strokeOpacity: 0.5
},
projection: new OpenLayers.Projection("EPSG:4326"),
displayInLayerSwitcher: false
});