From: Ævar Arnfjörð Bjarmason Date: Mon, 29 Jun 2009 02:11:34 +0000 (+0000) Subject: The default OpenLayers.Layer.GML style can be nearly invisible when X-Git-Tag: live~6923 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/b46b3c43279dc5e06cb6c476b00443fe2f5b503a 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. --- diff --git a/public/javascripts/map.js b/public/javascripts/map.js index c63461fe2..7c9798227 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -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 });