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:
parent
8d76bf978a
commit
b46b3c4327
1 changed files with 5 additions and 0 deletions
|
@ -111,6 +111,11 @@ function addMarkerToMap(position, icon, description) {
|
||||||
function addObjectToMap(url, zoom, callback) {
|
function addObjectToMap(url, zoom, callback) {
|
||||||
var layer = new OpenLayers.Layer.GML("Objects", url, {
|
var layer = new OpenLayers.Layer.GML("Objects", url, {
|
||||||
format: OpenLayers.Format.OSM,
|
format: OpenLayers.Format.OSM,
|
||||||
|
style: {
|
||||||
|
strokeColor: "blue",
|
||||||
|
strokeWidth: 3,
|
||||||
|
strokeOpacity: 0.5
|
||||||
|
},
|
||||||
projection: new OpenLayers.Projection("EPSG:4326"),
|
projection: new OpenLayers.Projection("EPSG:4326"),
|
||||||
displayInLayerSwitcher: false
|
displayInLayerSwitcher: false
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue